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
dariah
search-commons-webresources
Commits
5bcfa407
Commit
5bcfa407
authored
Feb 13, 2018
by
Gradl, Tobias
Browse files
71: Security (mainly admin sections)
Task-Url:
https://pm.winseda.de/issues/71
parent
76b1c1e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
js/_common/util.js
View file @
5bcfa407
...
...
@@ -81,6 +81,8 @@ var Util = function() {
"
'
"
:
'
'
'
,
"
/
"
:
'
/
'
};
this
.
ulevel
=
$
(
"
#ulevel
"
).
val
()
==
""
?
0
:
parseInt
(
$
(
"
#ulevel
"
).
val
());
};
var
__util
=
new
Util
();
...
...
js/schemas.js
View file @
5bcfa407
...
...
@@ -15,7 +15,8 @@ var SchemaEditor = function() {
"
~eu.dariah.de.minfba.common.status.ok
"
,
"
~eu.dariah.de.minfba.common.status.outdated
"
,
"
~eu.dariah.de.minfba.search.view.api.status_code
"
,
"
~eu.dariah.de.minfba.search.view.models.show_in_DME
"
"
~eu.dariah.de.minfba.search.view.models.show_in_DME
"
,
"
~eu.dariah.de.minfba.common.actions.delete
"
]);
this
.
createTable
();
...
...
@@ -23,6 +24,8 @@ var SchemaEditor = function() {
this
.
getScheregStatus
();
};
//<c:if test="${_auth.level >= 100}">
SchemaEditor
.
prototype
=
new
BaseTable
(
__util
.
getBaseUrl
()
+
"
datamodels/async/getData
"
,
"
#schemas-table-container
"
);
...
...
@@ -160,8 +163,10 @@ SchemaEditor.prototype.renderActionColumn = function(row, type, val, meta) {
}
var
result
=
""
;
result
+=
"
<button type='button' onclick='editor.triggerClearIndex(
\"
"
+
row
.
entity
.
id
+
"
\"
); return false;' class='btn btn-xs btn-link'><span class='glyphicon glyphicon-retweet'></span>
"
+
__translator
.
translate
(
"
~eu.dariah.de.minfba.search.actions.schemas.clear
"
)
+
"
</button>
"
;
result
+=
"
<button type='button' onclick='editor.triggerDropSchema(
\"
"
+
row
.
entity
.
id
+
"
\"
); return false;' class='btn btn-xs btn-link'><span class='glyphicon glyphicon-trash'></span> ~Delete</button>
"
;
if
(
__util
.
ulevel
>=
100
)
{
result
+=
"
<button type='button' onclick='editor.triggerClearIndex(
\"
"
+
row
.
entity
.
id
+
"
\"
); return false;' class='btn btn-xs btn-link'><span class='glyphicon glyphicon-retweet'></span>
"
+
__translator
.
translate
(
"
~eu.dariah.de.minfba.search.actions.schemas.clear
"
)
+
"
</button>
"
;
result
+=
"
<button type='button' onclick='editor.triggerDropSchema(
\"
"
+
row
.
entity
.
id
+
"
\"
); return false;' class='btn btn-xs btn-link'><span class='glyphicon glyphicon-trash'></span>
"
+
__translator
.
translate
(
"
~eu.dariah.de.minfba.common.actions.delete
"
)
+
"
</button>
"
;
}
/*result += "<div class='btn-group'>" +
"<button type='button' class='btn btn-default btn-xs'>~ View stats</button>" +
...
...
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