Skip to content
Snippets Groups Projects
Verified Commit 2b4f916a authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Remove preference

parent d5e7eda4
No related branches found
No related tags found
1 merge request!415Resolve "Serve as OAuth2 and OpenID Connect provider"
Pipeline #7960 passed with warnings
......@@ -212,14 +212,6 @@ class SchoolNameOfficial(StringPreference):
verbose_name = _("Official name of the school, e.g. as given by supervisory authority")
@site_preferences_registry.register
class EnableOAuthProvider(BooleanPreference):
section = auth
name = "oauth_provider_enabled"
default = False
verbose_name = _("Enable creation of OAuth2 providers")
@site_preferences_registry.register
class AvailableLanguages(MultipleChoicePreference):
section = internationalisation
......
......@@ -322,39 +322,19 @@ edit_default_dashboard_predicate = has_person & has_global_perm("core.edit_defau
rules.add_perm("core.edit_default_dashboard", edit_default_dashboard_predicate)
# OAuth2 permissions
add_oauth_applications_predicate = (
has_person
& is_site_preference_set(section="auth", pref="oauth_provider_enabled")
& has_global_perm("core.add_oauth_applications")
)
add_oauth_applications_predicate = has_person & has_global_perm("core.add_oauth_applications")
rules.add_perm("core.add_oauth_applications", add_oauth_applications_predicate)
list_oauth_applications_predicate = (
has_person
& is_site_preference_set(section="auth", pref="oauth_provider_enabled")
& has_global_perm("core.list_oauth_applications")
)
list_oauth_applications_predicate = has_person & has_global_perm("core.list_oauth_applications")
rules.add_perm("core.list_oauth_applications", list_oauth_applications_predicate)
view_oauth_applications_predicate = (
has_person
& is_site_preference_set(section="auth", pref="oauth_provider_enabled")
& has_global_perm("core.view_oauth_applications")
)
view_oauth_applications_predicate = has_person & has_global_perm("core.view_oauth_applications")
rules.add_perm("core.view_oauth_applications", view_oauth_applications_predicate)
update_oauth_applications_predicate = (
has_person
& is_site_preference_set(section="auth", pref="oauth_provider_enabled")
& has_global_perm("core.update_oauth_applications")
)
update_oauth_applications_predicate = has_person & has_global_perm("core.update_oauth_applications")
rules.add_perm("core.update_oauth_applications", update_oauth_applications_predicate)
delete_oauth_applications_predicate = (
has_person
& is_site_preference_set(section="auth", pref="oauth_provider_enabled")
& has_global_perm("core.delete_oauth_applications")
)
delete_oauth_applications_predicate = has_person & has_global_perm("core.delete_oauth_applications")
rules.add_perm("core.delete_oauth_applications", delete_oauth_applications_predicate)
# Upload and browse files via CKEditor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment