From: parmentelat Date: Thu, 22 Mar 2018 13:32:56 +0000 (+0100) Subject: create the disabled_registration site tag that allows to remove a specific site from... X-Git-Tag: plcapi-5.4-1~3 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=8b7ba869c3582b2db70f79ee920de57c1cfacf95 create the disabled_registration site tag that allows to remove a specific site from the drop-down in the person registration form --- 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)