Exemplo n.º 1
0
        public static XpandPermissionPolicyRole GetAnonymousPermissionPolicyRole(this IObjectSpace objectSpace, string roleName, bool selfReadOnlyPermissions = true)
        {
            var anonymousRole = objectSpace.GetRole(roleName) as XpandPermissionPolicyRole;

            anonymousRole?.Permissions.AddRange(new[] {
                objectSpace.CreateModifierPermissionPolicy <MyDetailsOperationPermissionPolicyData>(Modifier.Allow),
                objectSpace.CreateModifierPermissionPolicy <AnonymousLoginOperationPermissionPolicyData>(Modifier.Allow)
            });
            return(anonymousRole);
        }