Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a499689c
authored
Jun 06, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: groupless users can see their own email
parent
5a55ce9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
circle/dashboard/templates/dashboard/profile.html
+1
-4
circle/dashboard/views.py
+2
-0
No files found.
circle/dashboard/templates/dashboard/profile.html
View file @
a499689c
...
...
@@ -27,11 +27,8 @@
<p>
{% trans "First name" %}: {{ profile.first_name|default:"-" }}
</p>
<p>
{% trans "Last name" %}: {{ profile.last_name|default:"-" }}
</p>
<p>
{# if the group list is not empty the logged in user is somewhat related to the user #}
{% if perm_group_list %}
{% if perm_email %}
{% trans "Email address" %}: {{ profile.email }}
{% else %}
-
{% endif %}
</p>
{% if request.user == profile %}
...
...
circle/dashboard/views.py
View file @
a499689c
...
...
@@ -2720,6 +2720,8 @@ class ProfileView(LoginRequiredMixin, DetailView):
# to any of the groups the user belongs to
context
[
'perm_group_list'
]
=
(
self
.
request
.
user
.
is_superuser
or
len
(
context
[
'groups'
])
>
0
)
context
[
'perm_email'
]
=
(
context
[
'perm_group_list'
]
or
self
.
request
.
user
==
user
)
# filter the virtual machine list
# if the logged in user is not superuser or not the user itself
...
...
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