Group Based Authorization in Jhipster Application





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















What I have to implement is Group Based Authorization in Jhipster Application.
Here is the detail Scenario of the current development:



As of now, Jhipster supports User->Role based authorization system where the roles are included in the Authorities.constant file and inside the authorities.csv as well which are declared as string Variables.



I already have generated entity which has its sub-entities with many to one relationship.



I have managed to create another component(not entity) from scratch called as group. I have also modified the POJO(java) and the model(angular) of the inbuilt User table(component) to have a foreign key as a Group ID. Moreover, I have created another Group component(backend + frontend) which is described as following:



Operation Permitted:
This is a dropdown i.e Read,Read/Write,Read/Write/Delete



Now, while creating a user, instead of assigning them to roles, I have assigned them to groups which indeed has some of its operations(stated above).



Since Jhipster already provides *JhiHasAuthority tag which can hide and show the elements in frontend accordingly, all I need to do is link those with Spring and the frontend.



Any help would be highly appreciated. Please let me know if anything else is required.



Thanks in Advance.










share|improve this question























  • Which authentication type do you use? Your design on server means that a user can belong to only one group which seems a limitation to me. Also I don't understand what is the difference between groups and roles in your app, why not just modifying roles or if you really need groups why not declaring them as an entity with relationships to both User and Authorithy?

    – Gaël Marziou
    Nov 16 '18 at 16:36




















0















What I have to implement is Group Based Authorization in Jhipster Application.
Here is the detail Scenario of the current development:



As of now, Jhipster supports User->Role based authorization system where the roles are included in the Authorities.constant file and inside the authorities.csv as well which are declared as string Variables.



I already have generated entity which has its sub-entities with many to one relationship.



I have managed to create another component(not entity) from scratch called as group. I have also modified the POJO(java) and the model(angular) of the inbuilt User table(component) to have a foreign key as a Group ID. Moreover, I have created another Group component(backend + frontend) which is described as following:



Operation Permitted:
This is a dropdown i.e Read,Read/Write,Read/Write/Delete



Now, while creating a user, instead of assigning them to roles, I have assigned them to groups which indeed has some of its operations(stated above).



Since Jhipster already provides *JhiHasAuthority tag which can hide and show the elements in frontend accordingly, all I need to do is link those with Spring and the frontend.



Any help would be highly appreciated. Please let me know if anything else is required.



Thanks in Advance.










share|improve this question























  • Which authentication type do you use? Your design on server means that a user can belong to only one group which seems a limitation to me. Also I don't understand what is the difference between groups and roles in your app, why not just modifying roles or if you really need groups why not declaring them as an entity with relationships to both User and Authorithy?

    – Gaël Marziou
    Nov 16 '18 at 16:36
















0












0








0








What I have to implement is Group Based Authorization in Jhipster Application.
Here is the detail Scenario of the current development:



As of now, Jhipster supports User->Role based authorization system where the roles are included in the Authorities.constant file and inside the authorities.csv as well which are declared as string Variables.



I already have generated entity which has its sub-entities with many to one relationship.



I have managed to create another component(not entity) from scratch called as group. I have also modified the POJO(java) and the model(angular) of the inbuilt User table(component) to have a foreign key as a Group ID. Moreover, I have created another Group component(backend + frontend) which is described as following:



Operation Permitted:
This is a dropdown i.e Read,Read/Write,Read/Write/Delete



Now, while creating a user, instead of assigning them to roles, I have assigned them to groups which indeed has some of its operations(stated above).



Since Jhipster already provides *JhiHasAuthority tag which can hide and show the elements in frontend accordingly, all I need to do is link those with Spring and the frontend.



Any help would be highly appreciated. Please let me know if anything else is required.



Thanks in Advance.










share|improve this question














What I have to implement is Group Based Authorization in Jhipster Application.
Here is the detail Scenario of the current development:



As of now, Jhipster supports User->Role based authorization system where the roles are included in the Authorities.constant file and inside the authorities.csv as well which are declared as string Variables.



I already have generated entity which has its sub-entities with many to one relationship.



I have managed to create another component(not entity) from scratch called as group. I have also modified the POJO(java) and the model(angular) of the inbuilt User table(component) to have a foreign key as a Group ID. Moreover, I have created another Group component(backend + frontend) which is described as following:



Operation Permitted:
This is a dropdown i.e Read,Read/Write,Read/Write/Delete



Now, while creating a user, instead of assigning them to roles, I have assigned them to groups which indeed has some of its operations(stated above).



Since Jhipster already provides *JhiHasAuthority tag which can hide and show the elements in frontend accordingly, all I need to do is link those with Spring and the frontend.



Any help would be highly appreciated. Please let me know if anything else is required.



Thanks in Advance.







java angular spring-boot jhipster






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 '18 at 12:47









Aayush Aayush

427




427













  • Which authentication type do you use? Your design on server means that a user can belong to only one group which seems a limitation to me. Also I don't understand what is the difference between groups and roles in your app, why not just modifying roles or if you really need groups why not declaring them as an entity with relationships to both User and Authorithy?

    – Gaël Marziou
    Nov 16 '18 at 16:36





















  • Which authentication type do you use? Your design on server means that a user can belong to only one group which seems a limitation to me. Also I don't understand what is the difference between groups and roles in your app, why not just modifying roles or if you really need groups why not declaring them as an entity with relationships to both User and Authorithy?

    – Gaël Marziou
    Nov 16 '18 at 16:36



















Which authentication type do you use? Your design on server means that a user can belong to only one group which seems a limitation to me. Also I don't understand what is the difference between groups and roles in your app, why not just modifying roles or if you really need groups why not declaring them as an entity with relationships to both User and Authorithy?

– Gaël Marziou
Nov 16 '18 at 16:36







Which authentication type do you use? Your design on server means that a user can belong to only one group which seems a limitation to me. Also I don't understand what is the difference between groups and roles in your app, why not just modifying roles or if you really need groups why not declaring them as an entity with relationships to both User and Authorithy?

– Gaël Marziou
Nov 16 '18 at 16:36














0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338243%2fgroup-based-authorization-in-jhipster-application%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338243%2fgroup-based-authorization-in-jhipster-application%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python