Skip to content
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

user role permissions level #16

Closed
sksaini007 opened this issue Feb 11, 2016 · 3 comments
Closed

user role permissions level #16

sksaini007 opened this issue Feb 11, 2016 · 3 comments

Comments

@sksaini007
Copy link

hi,
i want to use user role permissions is like: userrole -> module -> permissions.
for Example

  1. admin-> user management -> (view, add, edit, delete)
  2. member-> user management -> (view, edit)
    So please help me for this type user role permissions management.

Thanks,
Sachin Saini

@mikemclin
Copy link
Owner

The service manages the abilities for the current user. If you are wondering if a particular role can do something, then you shouldn't need my package to do so.

I'm having trouble understanding what you are trying to accomplish. If you can provide some example code, maybe I can better understand.

@sksaini007
Copy link
Author

hi,mikemclin
My JSON data is

var aclData = [
    {"super admin":
        [
            {"user management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"order management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"product management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"sales management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"report management":
                ["view"],
                ["edit"],
                ["delete"]
            }           
        ]
    },
    {"admin":
        [
            {"user management":
                ["add"],
                ["view"],
                ["edit"]                
            },
            {"order management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"product management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"sales management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"report management":
                ["view"],
                ["edit"]                
            }           
        ]
    },
    {"manager":
        [
            {"user management":
                ["add"],
                ["view"]                                
            },
            {"order management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"product management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"sales management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            },
            {"report management":
                ["view"]                                
            }           
        ]
    },
    {"sales team":
        [           
            {"order management":
                ["add"],
                ["view"],
                ["edit"]                
            },
            {"product management":              
                ["view"]                                
            },
            {"sales management":
                ["add"],
                ["view"],
                ["edit"],
                ["delete"]
            }       
        ]
    }
]

role json.txt

@mikemclin
Copy link
Owner

The data will need to be transformed/mapped to a compatible format for this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants