Skip to content

PermissionGrantServiceCollectionExtensions.AddPermissionGrants method

Adds PermissionGrantValidator as the IPermissionGrantValidator, with the PermissionGrantOptions that ConfigureSections reads from the "PermissionGrants" section of the settings. The application also registers its IUserGrantedPermissionsProvider, without which only super admins are protected from administrators changing their accounts.

public static IServiceCollection AddPermissionGrants(this IServiceCollection collection)
parameter description
collection The service collection.

See Also