From 8b7ba869c3582b2db70f79ee920de57c1cfacf95 Mon Sep 17 00:00:00 2001 From: parmentelat Date: Thu, 22 Mar 2018 14:32:56 +0100 Subject: [PATCH] create the disabled_registration site tag that allows to remove a specific site from the drop-down in the person registration form --- PLC/Accessors/Accessors_standard.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PLC/Accessors/Accessors_standard.py b/PLC/Accessors/Accessors_standard.py index 55ff66e..8ee3e91 100644 --- a/PLC/Accessors/Accessors_standard.py +++ b/PLC/Accessors/Accessors_standard.py @@ -113,3 +113,9 @@ define_accessors(current_module, Interface, "Backdoor", "backdoor", define_accessors(current_module, [Person,Slice,Site] , "SfaCreated", "sfa_created", "person/slice/site/sfa", "Tag objects created through SFA interfaces", set_roles=all_roles, expose_in_api=True) + +# set any value to this tag to prevent a site from showing up +# in the person registration form +define_accessors(current_module, Site, "DisabledRegistration", "disabled_registration", + "site", "Sites that have a non-void value are excluded from the drop-down list on the registration form", + set_roles=admin_roles, expose_in_api=True) -- 2.43.0