Skip to content

Conversation

@unkn0wnAPI
Copy link

Description

This PR adds an API endpoint that allows admins to perform the following user/calendar management tasks, which are normally only available via the admin dashboard:

  • Getting a list of all users added to Davis
  • Getting details of a specific user account
  • Getting a list of all calendars owned by a specific user
  • Getting details about a specific calendar owned by a specific user
  • Getting a list of users that have access to another user's calendar (Shared Calendar)
  • Sharing a user's calendar with a specific user (with write access enabled/disabled)
  • Removing access to a user's calendar from a specific user

Additionally, this PR would include:

  • Markdown API documentation with examples
  • Brief information about the endpoint in the main README.md file
  • A new Symfony command that can generate an API key

Reasoning for this PR

I wanted to centralize and automate calendar management in my environment. Rather than emulating browser clicks, I created an API endpoint that allows admins to perform basic tasks via API requests.

The logic for specific endpoints is based on existing code in this project and was designed to mimic its output and functionality, with additional security checks. I made the API endpoint paths match the paths I found using console debug:router to make it easier to understand what each route does. Since I use Davis with OpenLDAP, I skipped the logic regarding user creation, removal, etc.

Source / References

Logic found in /src/Controller/*.php files
Symfony Command Creation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant