show tagname when permission is denied
[plcapi.git] / PLC / Methods / DeleteInterfaceTag.py
index 187d25e..1bb4aad 100644 (file)
@@ -45,8 +45,8 @@ class DeleteInterfaceTag(Method):
         # 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: