Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
5529fdbb
Commit
5529fdbb
authored
Aug 27, 2019
by
Piotr Gawron
Browse files
setting write privilege automatically set read privilege
parent
20ad9ff8
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
5529fdbb
minerva
(
14.0.0
~
beta
.0
)
unstable
;
urgency
=
low
*
Small
improvement
:
sorting
by
columns
that
doesn
't make sense in admin
panel
is disabled (#895)
*
Small
improvement
:
sorting
by
columns
that
doesn
't make sense in admin
panel
is disabled (#895)
* Small improvement: version of minerva is visible in map browser panel
* Small improvement: CellDesigner layers are always visualized as pathways
(#813)
* Small improvement: setting "Modify project| checkbox automatically select
"View project" checkbox when editing privileges (#920)
* Bug fix: work on FF Private Window mode could cause logout or raise an
error on when opening new tab with minerva (#892)
* Bug fix: fetching list of miRnas resulted sometimes in "Internal Server
...
...
frontend-js/src/main/js/gui/admin/EditProjectDialog.js
View file @
5529fdbb
...
...
@@ -606,6 +606,12 @@ EditProjectDialog.prototype.createUsersTabContent = function () {
var
type
=
$
(
this
).
attr
(
"
data
"
).
split
(
"
,
"
)[
0
];
var
login
=
$
(
this
).
attr
(
"
data
"
).
split
(
"
,
"
)[
1
];
if
(
$
(
this
).
prop
(
"
checked
"
))
{
if
(
type
===
PrivilegeType
.
WRITE_PROJECT
)
{
var
readCheckbox
=
$
(
"
[data='
"
+
PrivilegeType
.
READ_PROJECT
+
"
,
"
+
login
+
"
']
"
,
usersTable
);
if
(
!
readCheckbox
.
is
(
"
:checked
"
))
{
readCheckbox
.
click
();
}
}
return
self
.
grantPrivilege
(
self
.
_userByLogin
[
login
],
type
,
self
.
getProject
().
getProjectId
());
}
else
{
return
self
.
revokePrivilege
(
self
.
_userByLogin
[
login
],
type
,
self
.
getProject
().
getProjectId
());
...
...
frontend-js/src/main/js/gui/admin/EditUserDialog.js
View file @
5529fdbb
...
...
@@ -10,6 +10,7 @@ var ValidationError = require('../../ValidationError');
var
ObjectExistsError
=
require
(
'
../../ObjectExistsError
'
);
var
Functions
=
require
(
'
../../Functions
'
);
var
PrivilegeType
=
require
(
'
../../map/data/PrivilegeType
'
);
// noinspection JSUnusedLocalSymbols
var
logger
=
require
(
'
../../logger
'
);
...
...
@@ -354,6 +355,12 @@ EditUserDialog.prototype.initProjectsTab = function () {
var
type
=
data
[
0
];
var
projectId
=
data
[
1
];
if
(
$
(
this
).
is
(
"
:checked
"
))
{
if
(
type
===
PrivilegeType
.
WRITE_PROJECT
)
{
var
readCheckbox
=
$
(
"
[data='
"
+
PrivilegeType
.
READ_PROJECT
+
"
:
"
+
data
[
1
]
+
"
']
"
,
projectsTable
);
if
(
!
readCheckbox
.
is
(
"
:checked
"
))
{
readCheckbox
.
click
();
}
}
return
self
.
grantPrivilege
({
privilegeType
:
type
,
objectId
:
projectId
});
}
else
{
return
self
.
revokePrivilege
({
privilegeType
:
type
,
objectId
:
projectId
});
...
...
@@ -365,6 +372,12 @@ EditUserDialog.prototype.initProjectsTab = function () {
var
type
=
data
[
0
];
var
projectId
=
data
[
1
];
if
(
$
(
this
).
is
(
"
:checked
"
))
{
if
(
type
===
PrivilegeType
.
WRITE_PROJECT
)
{
var
readCheckbox
=
$
(
"
[data='
"
+
PrivilegeType
.
READ_PROJECT
+
"
:
"
+
data
[
1
]
+
"
']
"
,
self
.
getElement
());
if
(
!
readCheckbox
.
is
(
"
:checked
"
))
{
readCheckbox
.
click
();
}
}
return
self
.
grantPrivilege
({
privilegeType
:
type
,
objectId
:
projectId
});
}
else
{
return
self
.
revokePrivilege
({
privilegeType
:
type
,
objectId
:
projectId
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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