Skip to content

Default collection permission to user that inserted the collection #371

Closed

Description

@int-20h

Currently we can set permissions to the collection and also to the document. However, if we want to keep documents to the respective user that created them, the application would have to do that in code. Rather than relying on the application to set the read/write to the user creating the document, AppWrite could have a configuration flag/toggle button that sets the Read / Write to the user that inserted the document.

The UI might look as follow. I couldn't think of a better name for the toggle button

image

The impact is outlined as follow:

  • UI to display the toggle button
  • DB attribute to hold the flag
  • Collection API for create and update to set the flag
  • Document API onInsert to add the user as part of the read and write permission if the flag is set

Activity

  1. eldadfux commented on Jun 3, 2020

    @eldadfux
    Member

    This issue resembles to #246, but I think your idea might be a good solution or at least a good direction to follow.

    I'm not sure it's verbose enough for a developer to understand by himself, but if we could think of some terms that will be more obvious it might work well.

    @christyjacob4 what do you think?

  2. added
    discussion
    enhancement
    on Jun 3, 2020
  3. int-20h commented on Jun 3, 2020

    @int-20h
    Author

    Yes, #246 outlines the same need/want as this issue. I'm providing a possible solution for this ask. The name should either be more descriptive or add more info at the "i" icon hover.

  4. eldadfux commented on Sep 30, 2021

    @eldadfux
    Member

    We are going to introduce new permission models as part of #1281 - closing this issue for now

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions