Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [soteria-dev] Programmatically change roles

Hi,

Just declaring roles at startup can be programmatically done via ServletContext#declareRoles, but this is static (only at startup time) and doesn't allow you to associate permissions with this.

It's *basically* possible to do it dynamically as well. I approximately implemented a prototype for this that was intended to be in EE Security 1.0, but since we spent all the little time that we had on finalising the functionality that's in EE Security now, I never started the discussion about this really.


I talks about this SO question that approximately asks for what you're also asking for: https://stackoverflow.com/questions/27341665/is-it-possible-to-determine-group-membership-of-a-user-on-demand-instead-of-when

A related question is to add permissions like one can now declare roles. We talked about that before, and for a moment it seemed default JACC could do that, but it's not that clear cut.

Kind regards,
Arjan








On Sat, Oct 6, 2018 at 11:43 AM Ulrich Cech <developer@xxxxxxxxxxxx> wrote:
Hi Arjan,

one additional question: is it possible to introduce new roles programmatically? Currently, I have to list the roles in web.xml, otherwise the container does not know about any other roles.

Thanks again and bye
Ulrich



Am 04.10.18 um 00:22 schrieb arjan tijms:
Glad to help! 

On Thu, Oct 4, 2018 at 12:17 AM Ulrich Cech <developer@xxxxxxxxxxxx> wrote:


On Sat, Oct 6, 2018 at 11:43 AM Ulrich Cech <developer@xxxxxxxxxxxx> wrote:
Hi Arjan,

one additional question: is it possible to introduce new roles programmatically? Currently, I have to list the roles in web.xml, otherwise the container does not know about any other roles.

Thanks again and bye
Ulrich



Am 04.10.18 um 00:22 schrieb arjan tijms:
Glad to help! 

On Thu, Oct 4, 2018 at 12:17 AM Ulrich Cech <developer@xxxxxxxxxxxx> wrote:



Back to the top