Changeset 3655f02 for asadb/groups
- Timestamp:
- Aug 11, 2011, 2:34:18 AM (14 years ago)
- Branches:
- master, space-access, stable, stage, test-hooks
- Children:
- 70f2dd3
- Parents:
- b6d89f2
- git-author:
- Alex Dehnert <adehnert@…> (08/11/11 02:33:10)
- git-committer:
- Alex Dehnert <adehnert@…> (08/11/11 02:34:18)
- Location:
- asadb/groups
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/models.py
r2abe1dc r3655f02 62 62 # permission that controls the admin interface 63 63 ('admin_group', 'Administer basic group information'), 64 ('view_signatories', 'View signatory information for all groups'), 64 65 ) 65 66 -
asadb/groups/views.py
rc47b2e4 r3655f02 31 31 users_groups = [] 32 32 groupmsg = "" 33 has_perms = [] 33 34 if request.user.is_authenticated(): 34 35 username = request.user.username … … 37 38 if len(users_groups) == 0: 38 39 groupmsg = "You do not currently appear to be listed with any groups." 40 41 perms = groups.models.Group._meta.permissions 42 perms += ( 43 ('change_group', 'Change arbitrary group information', ), 44 ) 45 for perm_name, perm_desc in perms: 46 if request.user.has_perm('groups.%s' % (perm_name, )): 47 has_perms.append((perm_name, perm_desc, )) 39 48 else: 40 49 groupmsg = "Log in to see the groups that you are listed with." … … 42 51 'groups': users_groups, 43 52 'groupmsg': groupmsg, 53 'has_perms': has_perms, 44 54 'pagename': 'homepage', 45 55 }
Note: See TracChangeset
for help on using the changeset viewer.