Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
77023e27
Commit
77023e27
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-edit-panel
parents
fe53134c
374c850d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!103
Quick main-release of documentation
,
!98
ENH: allow to provide a function that creates the form to create_show_form_callback
Pipeline
#35507
passed
2 years ago
Stage: linting
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
src/core/js/ext_entity_acl.js
+19
-2
19 additions, 2 deletions
src/core/js/ext_entity_acl.js
with
23 additions
and
2 deletions
CHANGELOG.md
+
4
−
0
View file @
77023e27
...
...
@@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
modal and an SSS submission button, respectively.
*
Allow to supply a function that creates the form instead of a config to
create_show_form_callback
*
`BUILD_MODULE_EXT_ENTITY_ACL_USER_MANAGEMENT_BUTTON`
build variable with which
a button to the user management is added to the navbar for users with role
administration if
`BUILD_MODULE_EXT_ENTITY_ACL=ENABLED`
.
### Changed (for changes in existing functionality)
### Deprecated
...
...
This diff is collapsed.
Click to expand it.
src/core/js/ext_entity_acl.js
+
19
−
2
View file @
77023e27
...
...
@@ -32,10 +32,15 @@
*
* BUILD_MODULE_EXT_ENTITY_ACL_URI_ROOT=[scheme://host:port]/what/evs
*
* Enable/disable the creation of a user-management link that is shown to
* administrators with
*
* BUILD_MODULE_EXT_ENTITY_ACL_USER_MANAGEMENT_BUTTON=ENABLED
*
*
* @author Timm Fitschen
*/
var
ext_entity_acl
=
function
(
$
,
connection
,
getEntityVersion
,
getEntityID
,
logger
)
{
var
ext_entity_acl
=
function
(
$
,
connection
,
getEntityVersion
,
getEntityID
,
logger
,
navbar
,
userIsAdministrator
)
{
const
BUILD_MODULE_EXT_ENTITY_ACL_URI_ROOT
=
connection
.
getBasePath
()
+
"
webinterface/acm/entityacl/
"
;
const
_buttons_list_class
=
"
caosdb-v-entity-header-buttons-list
"
;
...
...
@@ -69,6 +74,14 @@ var ext_entity_acl = function ($, connection, getEntityVersion, getEntityID, log
$
(
entity
).
find
(
`.
${
_buttons_list_class
}
.
${
_entity_acl_link_class
}
`
).
remove
();
}
var
showUserManagementLink
=
function
()
{
if
(
userIsAdministrator
())
{
navbar
.
add_button
(
$
(
'
<a class="nav-link" href="/webinterface/acm/">User Administration</a>
'
)[
0
],
{
title
:
"
Go to user administration
"
});
}
}
var
_init
=
function
()
{
for
(
let
entity
of
$
(
"
.caosdb-entity-panel
"
))
{
remove_entity_acl_link
(
entity
);
...
...
@@ -82,6 +95,10 @@ var ext_entity_acl = function ($, connection, getEntityVersion, getEntityID, log
* Removes all respective buttons if present before adding a new one.
*/
var
init
=
function
()
{
if
(
"
${BUILD_MODULE_EXT_ENTITY_ACL_USER_MANAGEMENT_BUTTON}
"
==
"
ENABLED
"
)
{
showUserManagementLink
();
}
_init
();
// edit-mode-listener
...
...
@@ -95,7 +112,7 @@ var ext_entity_acl = function ($, connection, getEntityVersion, getEntityID, log
init
:
init
};
}(
$
,
connection
,
getEntityVersion
,
getEntityID
,
log
.
getLogger
(
"
ext_entity_acl
"
));
}(
$
,
connection
,
getEntityVersion
,
getEntityID
,
log
.
getLogger
(
"
ext_entity_acl
"
)
,
navbar
,
userIsAdministrator
);
$
(
document
).
ready
(
function
()
{
if
(
"
${BUILD_MODULE_EXT_ENTITY_ACL}
"
==
"
ENABLED
"
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment