-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1957. Role filter for create new map #1958
Conversation
Fix geosolutions-it#1957. Now you can confiure the plugin to display only for the allowedRoles in configuration
web/client/plugins/CreateNewMap.jsx
Outdated
}, | ||
contextTypes: { | ||
router: React.PropTypes.object | ||
}, | ||
getDefaultProps() { | ||
return { | ||
mapType: "leaflet", | ||
allowedRoles: ["ADMIN", "USER"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but... do we have other roles? maybe we should use groups...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default all logged in, but we can deny for normal users via configuration.Using groups is a good idea for the future.
web/client/plugins/CreateNewMap.jsx
Outdated
@@ -18,7 +18,9 @@ class CreateNewMap extends React.Component { | |||
mapType: PropTypes.string, | |||
onGoToMap: PropTypes.func, | |||
colProps: PropTypes.object, | |||
isLoggedIn: PropTypes.bool | |||
isLoggedIn: PropTypes.bool, | |||
allowedRoles: React.PropTypes.array, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove React.PropTypes and use PropTypes
Fix #1957. Now you can confiure the plugin to display only for the allowedRoles in configuration