Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
a8462e98
Commit
a8462e98
authored
Oct 5, 2020
by
William Enright
Committed by
Larbi Gharib
Oct 7, 2020
Browse files
Options
Downloads
Patches
Plain Diff
Hide Update button to non-admin users
Change-Id: I600feff5833ed45b661534d69670355b1f7e8f82
parent
713a4584
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
jams-react-client/src/components/Sidebar/Sidebar.js
+1
-1
1 addition, 1 deletion
jams-react-client/src/components/Sidebar/Sidebar.js
jams-react-client/src/layouts/Admin.js
+17
-13
17 additions, 13 deletions
jams-react-client/src/layouts/Admin.js
with
18 additions
and
14 deletions
jams-react-client/src/components/Sidebar/Sidebar.js
+
1
−
1
View file @
a8462e98
...
@@ -44,7 +44,7 @@ export default function Sidebar(props) {
...
@@ -44,7 +44,7 @@ export default function Sidebar(props) {
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
if
(
auth
.
isUpdateAvailable
())
if
(
auth
.
isUpdateAvailable
()
&&
auth
.
hasAdminScope
()
)
setOpen
(
true
)
setOpen
(
true
)
},
[
mainPanel
]);
},
[
mainPanel
]);
...
...
This diff is collapsed.
Click to expand it.
jams-react-client/src/layouts/Admin.js
+
17
−
13
View file @
a8462e98
...
@@ -117,6 +117,7 @@ export default function Admin({ ...rest }) {
...
@@ -117,6 +117,7 @@ export default function Admin({ ...rest }) {
const
handleQuery
=
()
=>
{
const
handleQuery
=
()
=>
{
setQuery
(
true
);
setQuery
(
true
);
if
(
auth
.
hasAdminScope
())
{
if
(
auth
.
isActivated
())
{
if
(
auth
.
isActivated
())
{
setDialogMessage
(
setDialogMessage
(
"
A new version of JAMS is available. Would you like to update now?
"
"
A new version of JAMS is available. Would you like to update now?
"
...
@@ -130,6 +131,9 @@ export default function Admin({ ...rest }) {
...
@@ -130,6 +131,9 @@ export default function Admin({ ...rest }) {
setMessageYes
(
"
Yes, go to Jami Store
"
);
setMessageYes
(
"
Yes, go to Jami Store
"
);
setMessageNo
(
"
No thanks
"
);
setMessageNo
(
"
No thanks
"
);
}
}
}
else
setDialogMessage
(
"
You are not allowed to access this section. Please contact your administrator to get administrator privileges.
"
);
};
};
// initialize and destroy the PerfectScrollbar plugin
// initialize and destroy the PerfectScrollbar plugin
...
...
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