Ejemplo n.º 1
0
        public static XpandRole GetAnonymousRole(this IObjectSpace objectSpace, string roleName, bool selfReadOnlyPermissions = true)
        {
            var anonymousRole = (XpandRole)objectSpace.GetRole(roleName);

            anonymousRole.Permissions.AddRange(new[] {
                objectSpace.CreateModifierPermission <MyDetailsOperationPermissionData>(Modifier.Allow),
                objectSpace.CreateModifierPermission <AnonymousLoginOperationPermissionData>(Modifier.Allow)
            });
            return(anonymousRole);
        }
Ejemplo n.º 2
0
        public static XpandRole GetAnonymousRole(this IObjectSpace objectSpace, string roleName, bool selfReadOnlyPermissions = true)
        {
            var anonymousRole = (XpandRole)objectSpace.GetRole(roleName);

            anonymousRole.Permissions.AddRange((IEnumerable <XpandPermissionData>) new[] {
                objectSpace.CreateModifierPermission <MyDetailsOperationPermissionData>(Modifier.Allow),
                objectSpace.CreateModifierPermission <AnonymousLoginOperationPermissionData>(Modifier.Allow)
            });
            anonymousRole.AddObjectAccessPermission(SecuritySystem.UserType, "[Oid] = CurrentUserId()", SecurityOperations.ReadOnlyAccess);
            return(anonymousRole);
        }