Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Public
zimbra-admin-api-js
Commits
3247ea11
Commit
3247ea11
authored
May 31, 2016
by
Juorder Antonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix forbidden request on domain admin when edit domain, add rights when assign admin domain.
parent
729d16b8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
14 deletions
+26
-14
.Vagrantfile.swp
.Vagrantfile.swp
+0
-0
path.json
path.json
+1
-1
add_admin_modal.jsx
src/components/domain/add_admin_modal.jsx
+5
-0
edit_domain.jsx
src/components/domain/edit_domain.jsx
+13
-9
config.json
src/config/config.json
+7
-4
No files found.
.Vagrantfile.swp
0 → 100644
View file @
3247ea11
File added
path.json
View file @
3247ea11
module.exports
=
{
"main"
:{
"js"
:
"/222612bundle.js"
}}
module.exports
=
{
"main"
:{
"js"
:
"/534318bundle.js"
}}
\ No newline at end of file
\ No newline at end of file
src/components/domain/add_admin_modal.jsx
View file @
3247ea11
...
@@ -25,6 +25,10 @@ export default class AddAdminModal extends React.Component {
...
@@ -25,6 +25,10 @@ export default class AddAdminModal extends React.Component {
this
.
state
=
{
this
.
state
=
{
users
:
null
users
:
null
};
};
this
.
plans
=
Object
.
keys
(
window
.
manager_config
.
plans
).
filter
((
plan
)
=>
{
return
window
.
manager_config
.
plans
[
plan
].
forRights
;
});
}
}
handleSearch
(
e
)
{
handleSearch
(
e
)
{
...
@@ -71,6 +75,7 @@ export default class AddAdminModal extends React.Component {
...
@@ -71,6 +75,7 @@ export default class AddAdminModal extends React.Component {
this
.
props
.
domain
.
addAdmin
(
this
.
props
.
domain
.
addAdmin
(
user
.
id
,
user
.
id
,
this
.
plans
,
(
error
)
=>
{
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
return
this
.
setState
({
return
this
.
setState
({
...
...
src/components/domain/edit_domain.jsx
View file @
3247ea11
...
@@ -124,8 +124,10 @@ export default class EditDomain extends React.Component {
...
@@ -124,8 +124,10 @@ export default class EditDomain extends React.Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
if
(
this
.
isGlobalAdmin
)
{
this
.
getDomain
();
this
.
getDomain
();
}
}
}
render
()
{
render
()
{
const
domain
=
this
.
state
.
domain
;
const
domain
=
this
.
state
.
domain
;
...
@@ -279,14 +281,6 @@ export default class EditDomain extends React.Component {
...
@@ -279,14 +281,6 @@ export default class EditDomain extends React.Component {
</
div
>
</
div
>
</
form
>
</
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
=
[
const
actions
=
[
...
@@ -317,6 +311,16 @@ export default class EditDomain extends React.Component {
...
@@ -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
/>;
return
<
div
/>;
}
}
}
}
...
...
src/config/config.json
View file @
3247ea11
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
"dnsApiUrl"
:
"http://zimbra.zboxapp.dev:3000"
,
"dnsApiUrl"
:
"http://zimbra.zboxapp.dev:3000"
,
"webMailUrl"
:
"https://192.168.1.8:8443"
,
"webMailUrl"
:
"https://192.168.1.8:8443"
,
"dns"
:
{
"dns"
:
{
"url"
:
"http://zimbra.zboxapp.dev:9081/
/powerdns_proxy/
"
,
"url"
:
"http://zimbra.zboxapp.dev:9081/
powerdns_proxy
"
,
"token"
:
"otto"
"token"
:
"otto"
},
},
"maxResultOnRequestZimbra"
:
20000
,
"maxResultOnRequestZimbra"
:
20000
,
...
@@ -14,17 +14,20 @@
...
@@ -14,17 +14,20 @@
"basic"
:
{
"basic"
:
{
"statusCos"
:
"btn-success"
,
"statusCos"
:
"btn-success"
,
"label"
:
"Básica"
,
"label"
:
"Básica"
,
"isEnabledToEdit"
:
true
"isEnabledToEdit"
:
true
,
"forRights"
:
true
},
},
"premium"
:
{
"premium"
:
{
"statusCos"
:
"btn-primary2"
,
"statusCos"
:
"btn-primary2"
,
"label"
:
"Premium"
,
"label"
:
"Premium"
,
"isEnabledToEdit"
:
true
"isEnabledToEdit"
:
true
,
"forRights"
:
true
},
},
"professional"
:
{
"professional"
:
{
"statusCos"
:
"btn-primary"
,
"statusCos"
:
"btn-primary"
,
"label"
:
"Profesional"
,
"label"
:
"Profesional"
,
"isEnabledToEdit"
:
true
"isEnabledToEdit"
:
true
,
"forRights"
:
true
},
},
"default"
:
false
,
"default"
:
false
,
"archiving"
:
{
"archiving"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment