~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to lib/common/db.py

  • Committer: dcoles
  • Date: 2008-08-07 06:46:32 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:989
Groups: Added userservice/assign_group call. This allows a user with the 
CAP_MANAGEGROUPS permission to assign a user into a group. This records the 
assignment in the database and then regenerates a svn-groups.conf file which 
specifies which users can access which repository.

This commit introduces the /groups repository (which means a groups directory 
will have to be created in repositories area and the apache config will have to 
be updated to allow the new dav repositories to work - see the changes to 
ivle-svn.conf/ivle-both.conf and install_proc for exact details). There is also 
a new parameter svn_group_conf in the config file so you need to run `setup.py 
config` too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
989
989
    project_set.projectsetid = %d;"""%projectsetid
990
990
        if dry:
991
991
            return query
992
 
        return self.db.query(query).dictresult()[0]      
 
992
        return self.db.query(query).dictresult()[0]
 
993
 
 
994
    def get_projectgroup_members(self, groupid, dry=False):
 
995
        """Returns the logins of all students in a project group
 
996
        """
 
997
        query = """\
 
998
SELECT login
 
999
FROM login, group_member
 
1000
WHERE login.loginid = group_member.loginid AND
 
1001
    group_member.groupid = %d;"""%groupid
 
1002
        if dry:
 
1003
            return query
 
1004
        return self.db.query(query).dictresult()
993
1005
 
994
1006
    def close(self):
995
1007
        """Close the DB connection. Do not call any other functions after