Commit 3ba6b03e authored by Matthieu Lamalle's avatar Matthieu Lamalle
Browse files

revert priviledges

parent 2a6efdca
......@@ -82,16 +82,13 @@ import { serverselectionActions } from '../../actions';
primary={user}
secondary={role}
/>
{ this.state.isOverIcon && role !== 'owner' &&
<Tooltip title="Editer">
<EditUser className={classes.iconuser} onClick={this.handleEditUserDialogOpenClick} />
</Tooltip>
}
{ this.state.isOverIcon && role !== 'owner' &&
<Tooltip title="Supprimer">
<DeleteUser className={classes.iconuser} onClick={this.handleDeleteUserDialogOpenClick} />
</Tooltip>
}
</ListItem>
<Dialog
open={this.state.deleteuserDialogOpen}
......@@ -122,7 +119,7 @@ import { serverselectionActions } from '../../actions';
<DialogTitle id="responsive-dialog-title-user-edit">{`Editer l'utilisateur "${user}" - ${role} ?`}</DialogTitle>
<DialogContent>
<DialogContentText>
Saisissez l'UID de l'utisitateur et le rôle à ajouter à la sélection
Saisissez l'UID de l'utilisateur et le rôle à ajouter à la sélection
</DialogContentText>
<TextField
id="User"
......@@ -147,6 +144,7 @@ import { serverselectionActions } from '../../actions';
<MenuItem value='admin'>Admin</MenuItem>
<MenuItem value='manager'>Manager</MenuItem>
<MenuItem value='viewer'>Viewer</MenuItem>
<MenuItem value='owner'>Owner</MenuItem>
</Select>
</DialogContent>
<DialogActions>
......
......@@ -113,7 +113,7 @@ class ServerSelectionsDetail extends React.Component {
inner={inner}
backLink={`/serverselections`}
navRight={
serverselection && !serverselection.serverselectionname.includes("_DEFAULT") &&
serverselection &&
<div>
<ResponsiveButton
sm={sm}
......@@ -239,6 +239,7 @@ class ServerSelectionsDetail extends React.Component {
<MenuItem value='admin'>Admin</MenuItem>
<MenuItem value='manager'>Manager</MenuItem>
<MenuItem value='viewer'>Viewer</MenuItem>
<MenuItem value='owner'>Owner</MenuItem>
</Select>
</DialogContent>
<DialogActions>
......
......@@ -78,11 +78,7 @@ function handleServerListSuccess(state, action) {
};
}
function handleServerSelectionsListSuccess(state, action) {
for (let [i, serverselection] of action.selections.entries()) {
if (serverselection.serverselectionname.includes('_DEFAULT')) {
action.selections.splice(i,1);
}
}
return {
...state,
selections: action.selections
......
......@@ -84,11 +84,6 @@ function updateLoadingFlag(state, isLoading) {
}
function handleServerSelectionListSuccess(state, action) {
for (let [i, serverselection] of action.serverselections.entries()) {
if (serverselection.serverselectionname.includes('_DEFAULT')) {
action.serverselections.splice(i,1);
}
}
return {
...state,
byId: action.serverselections.reduce((serverselections, serverselection) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment