# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.interface_belongs_to_person (self.api, src_if, self.caller):
pass
elif src_if_id != dst_if_id and AuthorizeHelpers.interface_belongs_to_person (self.api, dst_if, self.caller):
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.interface_belongs_to_person (self.api, interface, self.caller):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.node_belongs_to_person (self.api, node, self.caller):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.person_belongs_to_site (self.api, self.caller, site):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.interface_belongs_to_person (self.api, src_if, self.caller):
pass
elif src_if_id != dst_if_id and AuthorizeHelpers.interface_belongs_to_person (self.api, dst_if, self.caller):
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.interface_belongs_to_person (self.api, interface, self.caller):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.node_belongs_to_person (self.api, node, self.caller):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.person_belongs_to_site (self.api, self.caller, site):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.interface_belongs_to_person (self.api, src_if, self.caller):
pass
elif src_if_id != dst_if_id and AuthorizeHelpers.interface_belongs_to_person (self.api, dst_if, self.caller):
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.interface_belongs_to_person (self.api, interface, self.caller):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.node_belongs_to_person (self.api, node, self.caller):
pass
else:
# check authorizations
if 'admin' in self.caller['roles']:
pass
- elif not AuthorizeHelpers.person_access_tag_type (self.api, self.caller, tag_type):
- raise PLCPermissionDenied, "%s, no permission to use this tag type"%self.name
+ elif not AuthorizeHelpers.caller_may_access_tag_type (self.api, self.caller, tag_type):
+ raise PLCPermissionDenied, "%s, forbidden tag %s"%(self.name,tag_type['tagname'])
elif AuthorizeHelpers.person_belongs_to_site (self.api, self.caller, site):
pass
else: