create the disabled_registration site tag that allows to remove a specific site from...
[plcapi.git] / PLC / Accessors / Accessors_standard.py
index 941055d..8ee3e91 100644 (file)
@@ -68,8 +68,8 @@ define_accessors(current_module, Node, "Extensions", "extensions",
                  "node/config", "space-separated list of extensions to install",
                  set_roles=["admin"],expose_in_api=True)
 # access HRN - this is the ideal definition of roles, even if AddNodeTag cannot handle this
-define_accessors(current_module, [Node,Person,Slice] , "Hrn", "hrn",
-                 "node/person/slice/sfa", "SFA human readable name",
+define_accessors(current_module, [Node,Person,Slice,Site] , "Hrn", "hrn",
+                 "node/person/slice/site/sfa", "SFA human readable name",
                  set_roles=all_roles, expose_in_api=True)
 
 # test nodes perform their installation from an uncompressed bootstrapfs
@@ -108,3 +108,14 @@ define_accessors(current_module, Interface, "Alias", "alias",
 define_accessors(current_module, Interface, "Backdoor", "backdoor",
                  "interface/hidden", "For testing new settings",
                  set_roles=admin_roles)
+
+# we need to identify objects created through SFA interfaces
+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)