Skip to content

Commit

Permalink
omero group plugin using args.USER instead of args.user
Browse files Browse the repository at this point in the history
omero.plugins.sessions is using args.user for logging in to an existing session
  • Loading branch information
cneves authored and joshmoore committed Feb 22, 2012
1 parent b498a0a commit b3e0dec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/tools/OmeroPy/src/omero/plugins/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _configure(self, parser):

insert = parser.add(sub, self.insert, "Insert one or more users into a group")
insert.add_argument("GROUP", metavar="group", type=long, help = "ID of the group which is to have users added")
insert.add_argument("user", type=long, nargs="+", help = "ID of user to be inserted")
insert.add_argument("USER", type=long, nargs="+", help = "ID of user to be inserted")

def parse_perms(self, args):
perms = getattr(args, "perms", None)
Expand Down Expand Up @@ -169,11 +169,12 @@ def copy(self, args):

def insert(self, args):
import omero
print args
c = self.ctx.conn(args)
a = c.sf.getAdminService()
grp = a.getGroup(args.GROUP)
self.addusersbyid(c, grp, args.user)
self.ctx.out("Added %s users to %s" % (len(args.user), args.GROUP))
self.addusersbyid(c, grp, args.USER)
self.ctx.out("Added %s users to %s" % (len(args.USER), args.GROUP))

def addusersbyid(self, c, group, users):
import omero
Expand Down

0 comments on commit b3e0dec

Please sign in to comment.