java - jhipster- how to add a new role -


i trying add new role (role_reports) on project generated using jhipster. can see tables need updated (role, authority , role_authority mapping), not sure how go java part of it.

there few bits , pieces can figure out, concerned customisation may break design philosophies (like swagger api, spring security, etc.,)

has attempted , if in right direction highly appreciated.

add security/authoritiesconstants.java. , webapps/scripts/contstants.js. in example below, authority/role of manager added.

public final class authoritiesconstants {      private authoritiesconstants() {     }      public static final string admin = "role_admin";      public static final string user = "role_user";      public static final string manager = "role_manager";      public static final string anonymous = "role_anonymous"; } 

and in constants.js:

myapp.constant('user_roles', {         'all': '*',         'admin': 'role_admin',         'user': 'role_user',         'manager', 'role_manager'     }); 

the new role must added database. example, authorities.csv:

name role_admin role_user role_manager 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -