Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 2c60c17cdc4228a7b25509a9ebd3fa62d57190ec 1 parent 655c484
root authored
Showing with 14 additions and 4 deletions.
  1. +14 −4 godauth/perm.py
18 godauth/perm.py
View
@@ -2,7 +2,7 @@
from trac.perm import IPermissionGroupProvider
from trac.util import TracError
-class FlAuthPermissionGroupProvider(Component):
+class GodAuthPermissionGroupProvider(Component):
implements(IPermissionGroupProvider)
@@ -11,8 +11,18 @@ def get_permission_groups(self, username):
if username == 'Anonymous':
return groups
- if username == 'cal':
- groups.append('admins')
+ # gah! we don't actually get passed the reqeust, since trac works in an
+ # odd way. this is going to require some re-engineering
- return groups
+ #user = req.get_header("godauth-user")
+ #roles = req.get_header("godauth-roles")
+ user = None
+ roles = None
+
+ if user is not None:
+ if roles is not None:
+ roles = roles.split(',')
+ for role in roles:
+ groups.append(role)
+ return groups
Please sign in to comment.
Something went wrong with that request. Please try again.