diff --git a/Registry.Web/Services/Managers/AuthManager.cs b/Registry.Web/Services/Managers/AuthManager.cs index 8fbc36c9..9b973264 100644 --- a/Registry.Web/Services/Managers/AuthManager.cs +++ b/Registry.Web/Services/Managers/AuthManager.cs @@ -81,9 +81,6 @@ public async Task RequestAccess(T obj, AccessType access, User user) if (obj == null) throw new ArgumentNullException(nameof(obj)); - if (user == null) - throw new ArgumentNullException(nameof(user)); - return typeof(T) switch { _ when typeof(T) == typeof(Organization) => await RequestAccessToOrganization(obj as Organization, access, @@ -109,7 +106,7 @@ private async Task RequestAccessToDataset(Dataset dataset, AccessType acce var meta = ddb.Meta.GetSafe(); - // Anonymous users can only read if the dataset is public or unlisted + // Anonymous users can only read if the dataset is public if (user == null) return access == AccessType.Read && (meta.Visibility == Visibility.Public || meta.Visibility == Visibility.Unlisted);