Skip to content

How do I make a permission group that only gives the User acess to a resource "profiles" that has the same username as the user #265

Answered by ecton
Toasterson asked this question in Q&A
Discussion options

You must be logged in to vote

Currently, there isn't a way to execute any logic on the contents of documents to determine whether or not permissions should be applied. It's an interesting idea, and I'll try to brainstorm how this might be doable in the future.

Today, there are two approaches i can suggest:

  • Create a separate group for each user with a list of whatever documents are theirs to edit. This seems like a lot of work, and it makes me think that the User object should be able to have an inline permissions set to avoid needing user-specific roles for this type of configuration.
  • Lock the collection down, and use a connection with elevated permissions to do the document update after verifying the user is editing…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Toasterson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants