Changeset 4368c00


Ignore:
Timestamp:
Mar 14, 2012, 3:25:46 PM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
72a3d90, 227dc33
Parents:
d48e273
git-author:
Alex Dehnert <adehnert@…> (03/14/12 05:49:46)
git-committer:
Alex Dehnert <adehnert@…> (03/14/12 15:25:46)
Message:

Require login more effectively on private pages

Use the login_required decorator on pages that require being a group admin
(update main and update people). This will redirect people to the login page if
they aren't logged in, instead of giving them an ugly "Permission Denied"
message with no clue what to do next.

Fixes ASA Trac #86.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    rd48e273 r4368c00  
    161161        model = groups.models.Group
    162162
     163@login_required
    163164def manage_main(request, pk, ):
    164165    group = get_object_or_404(groups.models.Group, pk=pk)
     
    607608    return people, roles, name_map, officers_map
    608609
     610@login_required
    609611def manage_officers(request, pk, ):
    610612    group = get_object_or_404(groups.models.Group, pk=pk)
Note: See TracChangeset for help on using the changeset viewer.