AtHackerspace role added
parent
bb4ff2d756
commit
08065d6368
|
@ -1,5 +1,13 @@
|
||||||
import role
|
import role
|
||||||
|
import requests
|
||||||
|
import json
|
||||||
|
|
||||||
class GroupOfNames(role.GroupOfNames):
|
class GroupOfNames(role.GroupOfNames):
|
||||||
member_form = 'uid=%s,ou=People,dc=hackerspace,dc=pl'
|
member_form = 'uid=%s,ou=People,dc=hackerspace,dc=pl'
|
||||||
|
|
||||||
|
class AtHackerspace(role.Role):
|
||||||
|
def __call__(self, login, context=None):
|
||||||
|
return login in map(lambda x: x['login'],
|
||||||
|
requests.get('http://at.hackerspace.pl/api').json['users'])
|
||||||
|
|
||||||
from role import Allow, Deny, PamGroup, PosixGroup
|
from role import Allow, Deny, PamGroup, PosixGroup
|
||||||
|
|
Loading…
Reference in New Issue