public async Task <bool> DeleteRoleAsync(string roleId) { if (IsRocketModRole(roleId)) { throw new System.NotSupportedException(); } return(await m_BasePermissionRoleStore.DeleteRoleAsync(roleId)); }
public RocketPermissionsProviderResult DeleteGroup(string groupId) { return(AsyncHelper.RunSync(async() => { if (await m_PermissionRoleStore.DeleteRoleAsync(groupId)) { return RocketPermissionsProviderResult.Success; } return RocketPermissionsProviderResult.UnspecifiedError; })); }
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)); }
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; })); }