Class EnvironmentPermission
- Namespace
- ToSic.Eav.Environment.Sys.Permissions
- Assembly
- ToSic.Eav.Context.dll
Basic implementation of the environment permissions. Should normally be re-implemented by each specific platform.
[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class EnvironmentPermission : ServiceWithSetup<EnvironmentPermissionOptions>, IHasOptions<EnvironmentPermissionOptions>, IServiceWithSetup<EnvironmentPermissionOptions>, IHasLog, IServiceWithSetup<EnvironmentPermissionOptionsBase>
- Inheritance
-
objectEnvironmentPermission
- Implements
-
IServiceWithSetup<EnvironmentPermissionOptionsBase>
- Inherited Members
Constructors
EnvironmentPermission()
Basic implementation of the environment permissions. Should normally be re-implemented by each specific platform.
public EnvironmentPermission()
Methods
EnvironmentAllows(List<Grants>)
This should evaluate the grants and decide if the environment approves any of these grants. Note that in many cases the implementation will simply check if the environment provides edit permissions, but it can really check the grants required and compare each one with the environment.
public PermissionCheckInfo EnvironmentAllows(List<Grants> grants)
Parameters
grantsList<Grants>
Returns
- PermissionCheckInfo
Setup(EnvironmentPermissionOptionsBase)
public void Setup(EnvironmentPermissionOptionsBase options)
Parameters
optionsEnvironmentPermissionOptionsBase
VerifyConditionOfEnvironment(string)
Verify if a condition is a special code in the environment. Example: a DNN code which asks for "registered users" or "view-users"
public bool VerifyConditionOfEnvironment(string condition)
Parameters
conditionstring