Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a76c9e7d
authored
Jun 26, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add FutureMember model
parent
d48175e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
circle/dashboard/migrations/0010_auto__add_futuremember__add_unique_futuremember_org_id_group.py
+0
-0
circle/dashboard/models.py
+16
-0
No files found.
circle/dashboard/migrations/0010_auto__add_futuremember__add_unique_futuremember_org_id_group.py
0 → 100644
View file @
a76c9e7d
This diff is collapsed.
Click to expand it.
circle/dashboard/models.py
View file @
a76c9e7d
...
...
@@ -126,6 +126,18 @@ class Profile(Model):
return
self
.
get_display_name
()
class
FutureMember
(
Model
):
org_id
=
CharField
(
max_length
=
64
,
help_text
=
_
(
'Unique identifier of the person, e.g. a student number.'
))
group
=
ForeignKey
(
Group
)
class
Meta
:
unique_together
=
(
'org_id'
,
'group'
)
def
__unicode__
(
self
):
return
u"
%
s (
%
s)"
%
(
self
.
org_id
,
self
.
group
)
class
GroupProfile
(
AclBase
):
ACL_LEVELS
=
(
(
'operator'
,
_
(
'operator'
)),
...
...
@@ -210,6 +222,10 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
group
,
unicode
(
g
))
g
.
user_set
.
add
(
sender
)
for
i
in
FutureMember
.
objects
.
filter
(
org_id
=
value
):
i
.
group
.
user_set
.
add
(
sender
)
i
.
delete
()
owneratrs
=
getattr
(
settings
,
'SAML_GROUP_OWNER_ATTRIBUTES'
,
[])
for
group
in
chain
(
*
[
attributes
[
i
]
for
i
in
owneratrs
if
i
in
attributes
]):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment