from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Auth import PasswordAuth
-from PLC.Nodes import Node, Nodes
from PLC.NodeGroups import NodeGroup, NodeGroups
class AdmDeleteNodeGroup(Method):
nodegroup = nodegroups.values()[0]
- # If we are not an admin, make sure that the caller is a
- # member of the site at which the node is located.
- if 'admin' not in self.caller['roles']:
- # Authenticated function
- raise PLCPermissionDenied, "Not allowed to delete nodes groups"
-
nodegroup.delete()
return 1