Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

this still doesn't work - will need to be re-thought

  • Loading branch information...
commit f6385a19d3c993cfa59b02e646e9965d546bcfdf 1 parent 35b4cbc
Cal Henderson authored root committed

Showing 1 changed file with 14 additions and 4 deletions. Show diff stats Hide diff stats

  1. +14 4 godauth/perm.py
18 godauth/perm.py
@@ -2,7 +2,7 @@
2 2 from trac.perm import IPermissionGroupProvider
3 3 from trac.util import TracError
4 4
5   -class FlAuthPermissionGroupProvider(Component):
  5 +class GodAuthPermissionGroupProvider(Component):
6 6
7 7 implements(IPermissionGroupProvider)
8 8
@@ -11,8 +11,18 @@ def get_permission_groups(self, username):
11 11 if username == 'Anonymous':
12 12 return groups
13 13
14   - if username == 'cal':
15   - groups.append('admins')
  14 + # gah! we don't actually get passed the reqeust, since trac works in an
  15 + # odd way. this is going to require some re-engineering
16 16
17   - return groups
  17 + #user = req.get_header("godauth-user")
  18 + #roles = req.get_header("godauth-roles")
  19 + user = None
  20 + roles = None
  21 +
  22 + if user is not None:
  23 + if roles is not None:
  24 + roles = roles.split(',')
  25 + for role in roles:
  26 + groups.append(role)
18 27
  28 + return groups

0 comments on commit f6385a1

Please sign in to comment.
Something went wrong with that request. Please try again.