EntityAuthorizeScope: Read for all, Write only for Admin

I am trying to set the authorisation on an entity and want to limit Write/Delete permissions to users with the scope of Admin, but want anyone to have read access, even if not logged in.

How would I set this up in attributes? Or is that not possible?

For the Admin I can set

[EntityAuthorizeScopes(Admin_Scope, EntitySetPermissionsAll)]

But what about keeping it open for read for everyone else?

There is no way to set this with attributes, as you are mixing public/non-public permissions. You will have to implement that using server-side events.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.