Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
0667503b
Commit
0667503b
authored
Feb 20, 2020
by
Robert Czechowski
Browse files
Make users able to insert their address if they are actually not members of a group
parent
631c54d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core.rs
View file @
0667503b
...
...
@@ -816,6 +816,8 @@ pub fn show_profile<T: MedalConnection>(conn: &T, session_token: &str, user_id:
data
.insert
(
"profile_logincode"
.to_string
(),
to_json
(
&
session
.logincode
));
if
session
.password
.is_some
()
{
data
.insert
(
"profile_username"
.to_string
(),
to_json
(
&
session
.username
));
}
if
session
.managed_by
.is_none
()
{
data
.insert
(
"profile_not_in_group"
.into
(),
to_json
(
&
true
));
}
data
.insert
(
"ownprofile"
.into
(),
to_json
(
&
true
));
...
...
@@ -847,6 +849,8 @@ pub fn show_profile<T: MedalConnection>(conn: &T, session_token: &str, user_id:
data
.insert
(
"profile_logincode"
.to_string
(),
to_json
(
&
user
.logincode
));
if
user
.password
.is_some
()
{
data
.insert
(
"profile_username"
.to_string
(),
to_json
(
&
user
.username
));
}
if
user
.managed_by
.is_none
()
{
data
.insert
(
"profile_not_in_group"
.into
(),
to_json
(
&
true
));
}
...
...
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