Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
17db3ff2
Commit
17db3ff2
authored
Oct 11, 2017
by
Maxym Borodenko
Committed by
Matija Obreza
Oct 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User can't generate FTP password
parent
4a5b3fe6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/main/java/org/genesys2/server/service/impl/UserServiceImpl.java
...ava/org/genesys2/server/service/impl/UserServiceImpl.java
+1
-1
src/main/webapp/WEB-INF/jsp/user/profile.jsp
src/main/webapp/WEB-INF/jsp/user/profile.jsp
+5
-5
No files found.
src/main/java/org/genesys2/server/service/impl/UserServiceImpl.java
View file @
17db3ff2
...
...
@@ -390,7 +390,7 @@ public class UserServiceImpl extends BasicUserServiceImpl<UserRole, User> implem
*/
@Override
@Transactional
@PreAuthorize
(
"hasRole('ADMINISTRATOR') ||
principal.user.id == #user.id
"
)
@PreAuthorize
(
"hasRole('ADMINISTRATOR') ||
(hasRole('VETTEDUSER') && principal.id == #user.id)
"
)
public
void
setFtpPassword
(
final
User
user
,
final
String
ftpPassword
)
throws
PasswordPolicyException
{
assureGoodPassword
(
ftpPassword
);
user
.
setFtpPassword
(
passwordEncoder
.
encode
(
ftpPassword
));
...
...
src/main/webapp/WEB-INF/jsp/user/profile.jsp
View file @
17db3ff2
...
...
@@ -58,14 +58,14 @@
<c:if
test=
"
${
user
.
ftpPassword
ne
null
}
"
>
<div
class=
"form-group"
id=
"ftp-credentials"
>
<label
class=
"col-lg-2 control-label"
><spring:message
code=
"userprofile.page.ftp-credentials"
/></label>
<div
class=
"col-lg-5
form-control-static
"
>
<div
class=
"col-lg-5"
>
<div>
<label
for=
"ftp-username"
><spring:message
code=
"login.username"
/></label>
<span
id=
"ftp-username"
><c:out
value=
"
${
user
.
email
}
"
/></span>
<label
for=
"ftp-username"
class=
"control-label"
><spring:message
code=
"login.username"
/></label>
<span
id=
"ftp-username"
class=
"form-control-static"
><c:out
value=
"
${
user
.
email
}
"
/></span>
</div>
<div>
<label
for=
"ftp-password"
><spring:message
code=
"login.password"
/></label>
<span
id=
"ftp-password"
>
*
</span>
<label
for=
"ftp-password"
class=
"control-label"
><spring:message
code=
"login.password"
/></label>
<span
id=
"ftp-password"
class=
"form-control-static"
>
*
</span>
</div>
</div>
</div>
...
...
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