X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FAccessors%2FAccessors_standard.py;h=8ee3e910a851c874fe9d953e947758c19e203612;hb=8b7ba869c3582b2db70f79ee920de57c1cfacf95;hp=941055dea287e0d8e059187afb12aa80a45571e9;hpb=bec8961e0a761a131adceb5c9791028362d58cf1;p=plcapi.git diff --git a/PLC/Accessors/Accessors_standard.py b/PLC/Accessors/Accessors_standard.py index 941055d..8ee3e91 100644 --- a/PLC/Accessors/Accessors_standard.py +++ b/PLC/Accessors/Accessors_standard.py @@ -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)