Remove - Authentication/Authorization
You can use the [RemoveAuth]
-Attribute to control the permission of a user to remove data from the collection.
Usage
The [RemoveAuth]
-Attribute can be used on the model class
Every auth-attribute can be used in three ways.
Heredity: If you define AuthAttributes for a base class all sub classes will inherit this attributes until custom attributes of the same type are defined in the subclasses.
- Without attributes: Authentication required
- Policies: A comma separated string of policy-names. All policies have to succeed. Check out Policies for more details
- Function name: You can optionally pass the name of a function in the class that has to return a boolean. The function will get executed to check if the user is allowed for the action.
Heredity: If you define AuthAttributes for a base class all sub classes will inherit this attributes until custom attributes of the same type are defined in the subclasses.
The usage equals the usage of the [QueryAuth]
-Attribute. Check out the Documentation for Query