-
Notifications
You must be signed in to change notification settings - Fork 410
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
Fixed #1011 : fixed several bugs on permission editor #1023
Conversation
MV88
commented
Sep 23, 2016
•
edited
Loading
edited
- Some translations are missing and they also should be internationalized.
- If the user isn't the owner of the map --> hide permission editor
- The groups spinner should turn off if no available groups is left
@@ -123,7 +123,7 @@ const MetadataModal = React.createClass({ | |||
}, | |||
componentDidUpdate(prevProps) { | |||
if (this.props.show && !prevProps.show) { | |||
if (this.props.displayPermissionEditor) { | |||
if (this.props.displayPermissionEditor && this.props.user.name === this.props.map.owner) { |
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.
ADMIN role users should be able to edit map permissions even if they are not owners
@@ -157,7 +157,7 @@ const MetadataModal = React.createClass({ | |||
this.refs.thumbnail.updateThumbnail(this.props.map, metadata); | |||
}, | |||
renderPermissionEditor() { | |||
if (this.props.displayPermissionEditor) { | |||
if (this.props.displayPermissionEditor && this.props.user.name === this.props.map.owner) { |
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.
Same as above, ADMIN users must be able to edit permissions
@@ -30,18 +30,26 @@ describe('This test for MetadataModal', () => { | |||
expect(metadataModalItem).toExist(); | |||
|
|||
const metadataModalItemDom = ReactDOM.findDOMNode(metadataModalItem); | |||
expect(metadataModalItemDom).toNotExist(); | |||
expect(metadataModalItemDom).toExist(); |
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.
please test that it is not visible