YukiGasai / obsidian-google-calendar

Add Google Calendar inside Obsidian
https://yukigasai.github.io/obsidian-google-calendar/
GNU General Public License v3.0
342 stars 24 forks source link

Is there a way to use this plugin with reduced scope/permissions (e.g. calendar.readonly)? #239

Open mhafellner opened 5 months ago

mhafellner commented 5 months ago

Hi,

Thank you for creating and maintaining this amazing plugin! I love the functionality of creating event notes, but I really want to avoid messing up my calendars and don't intend to create/edit/delete events using this plugin. In fact it's a risk I want to remove.

Is there a way to reduce the scope to calendar.readonly or use any setting in Obsidian to prevent accidental deletion of events if I misclick or anything goes wrong?

Thank you for your help!

Best, Markus

matyasLevinsky commented 3 months ago

You are giving the plugin permission in the google calendar API, you could restrict those permissions in the google API making it that any actions in the plugin would not propagate. I haven't tried it but if you go to https://console.cloud.google.com/apis/api/calendar-json.googleapis.com/metrics?project=obsidiancalendersynchronizer and replace obsidiancalendersynchronizer with how you named your app, You can see around 111 methods that you have permitted by default, many of them are called delete or insert, since I don't know how the API works you will need to read the documentation and probably disable more methods. If you do this, I would ask you to write your selection here, or to add it to the documentation of this plugin.