embed svn Id keyword
[plcapi.git] / PLC / Methods / GetPeerName.py
index 9d0dc24..7b0bbe1 100644 (file)
@@ -1,3 +1,4 @@
+# $Id#
 from PLC.Method import Method
 from PLC.Parameter import Parameter
 from PLC.Auth import Auth
@@ -8,12 +9,12 @@ class GetPeerName (Method):
     """
     Returns this peer's name, as defined in the config as PLC_NAME
     """
-    roles = ['admin']
+
+    roles = ['admin', 'peer', 'node']
 
     accepts = [Auth()]
 
-    returns = Parameter (Peer.fields['peername'])
+    returns = Peer.fields['peername']
 
     def call (self, auth):
         return self.api.config.PLC_NAME
-