Commit f76b13db authored by Juorder Gonzalez's avatar Juorder Gonzalez

Merge pull request #149 from ZBoxApp/issues_resolved_manager

fix forbidden request on domain admin when edit domain, add rights wh…
parents 729d16b8 3247ea11
module.exports = {"main":{"js":"/222612bundle.js"}}
\ No newline at end of file
module.exports = {"main":{"js":"/534318bundle.js"}}
\ No newline at end of file
......@@ -25,6 +25,10 @@ export default class AddAdminModal extends React.Component {
this.state = {
users: null
};
this.plans = Object.keys(window.manager_config.plans).filter((plan) => {
return window.manager_config.plans[plan].forRights;
});
}
handleSearch(e) {
......@@ -71,6 +75,7 @@ export default class AddAdminModal extends React.Component {
this.props.domain.addAdmin(
user.id,
this.plans,
(error) => {
if (error) {
return this.setState({
......
......@@ -124,8 +124,10 @@ export default class EditDomain extends React.Component {
}
componentDidMount() {
if (this.isGlobalAdmin) {
this.getDomain();
}
}
render() {
const domain = this.state.domain;
......@@ -279,14 +281,6 @@ export default class EditDomain extends React.Component {
</div>
</form>
);
} else {
form = (
<div className='text-center'>
<h4 className='text-danger'>
{'Lo sentimos pero usted no tiene permiso para editar dominios.'}
</h4>
</div>
);
}
const actions = [
......@@ -317,6 +311,16 @@ export default class EditDomain extends React.Component {
);
}
if (!this.isGlobalAdmin) {
return (
<div className='text-center'>
<h4 className='text-danger'>
{'Lo sentimos pero usted no tiene permiso para editar dominios.'}
</h4>
</div>
);
}
return <div/>;
}
}
......
......@@ -5,7 +5,7 @@
"dnsApiUrl": "http://zimbra.zboxapp.dev:3000",
"webMailUrl": "https://192.168.1.8:8443",
"dns": {
"url": "http://zimbra.zboxapp.dev:9081//powerdns_proxy/",
"url": "http://zimbra.zboxapp.dev:9081/powerdns_proxy",
"token": "otto"
},
"maxResultOnRequestZimbra": 20000,
......@@ -14,17 +14,20 @@
"basic": {
"statusCos": "btn-success",
"label": "Básica",
"isEnabledToEdit": true
"isEnabledToEdit": true,
"forRights": true
},
"premium": {
"statusCos": "btn-primary2",
"label": "Premium",
"isEnabledToEdit": true
"isEnabledToEdit": true,
"forRights": true
},
"professional": {
"statusCos": "btn-primary",
"label": "Profesional",
"isEnabledToEdit": true
"isEnabledToEdit": true,
"forRights": true
},
"default": false,
"archiving": {
......
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