Ejemplo n.º 1
0
        public async Task <bool> DeleteRoleAsync(string roleId)
        {
            if (IsRocketModRole(roleId))
            {
                throw new System.NotSupportedException();
            }

            return(await m_BasePermissionRoleStore.DeleteRoleAsync(roleId));
        }
Ejemplo n.º 2
0
        public RocketPermissionsProviderResult DeleteGroup(string groupId)
        {
            return(AsyncHelper.RunSync(async() =>
            {
                if (await m_PermissionRoleStore.DeleteRoleAsync(groupId))
                {
                    return RocketPermissionsProviderResult.Success;
                }

                return RocketPermissionsProviderResult.UnspecifiedError;
            }));
        }
Ejemplo n.º 3
0
        public Task <bool> DeleteRoleAsync(string roleId)
        {
            if (string.IsNullOrEmpty(roleId))
            {
                throw new ArgumentException(nameof(roleId));
            }

            if (RocketModIntegrationEnabled() && IsRocketModRole(roleId))
            {
                var result = R.Permissions.DeleteGroup(roleId);
                return(Task.FromResult(result == RocketPermissionsProviderResult.Success));
            }

            return(m_BasePermissionRoleStore.DeleteRoleAsync(roleId));
        }
Ejemplo n.º 4
0
        public RocketPermissionsProviderResult DeleteGroup(string groupId)
        {
            if (string.IsNullOrEmpty(groupId))
            {
                throw new ArgumentException(nameof(groupId));
            }

            return(AsyncHelper.RunSync(async() =>
            {
                if (await m_PermissionRoleStore.DeleteRoleAsync(groupId))
                {
                    return RocketPermissionsProviderResult.Success;
                }

                return RocketPermissionsProviderResult.UnspecifiedError;
            }));
        }