On 01/09/20 19:04, anmols wrote: > Hello SMEs, > > I am new to Apache Syncope and I'm planning to use it for users and > permissions management for third-party applications. > > I am trying to model permissions for these applications as privileges that > are associated with roles assigned to a set to users/groups as described > here <http://syncope.apache.org/docs/2.1/reference-guide.html#privileges> . > > I want to trigger some custom logic every time that: > a.) A user gets added to/updated with/deleted from a role assignment. > b.) A privilege that is associated with certain role(s) gets updated. > > I am able to do (a.) using a custom implementation of LogicActions as > described here > <http://syncope.apache.org/docs/2.1/reference-guide.html#logicactions> in > the reference doc. > > I am wondering what is the best way to achieve (b.), i.e. how can I receive > a notification if the privileges for an application are updated such that I > can execute some custom logic? > > I read through the Notification > <http://syncope.apache.org/docs/2.1/reference-guide.html#notifications> > mechanism that is oriented towards sending emails but could not find an > appropriate entry point. > > I think I'm essentially looking for a LogicActions like hook for third-party > application privileges.
Hi Anmol, it seems you went quite some far, good! :-) As you have already found out, there is no (yet?) "standard" and clean way to achieve (b). If you have some confidence with AOP, the first thing coming to my mind would be to define a logic cut around method [1], similar to what [2] does, but more retailed to [1]. Does it sound as feasible? Regards. [1] https://github.com/apache/syncope/blob/syncope-2.1.6/core/logic/src/main/java/org/apache/syncope/core/logic/ApplicationLogic.java#L85 [2] https://github.com/apache/syncope/blob/syncope-2.1.6/core/logic/src/main/java/org/apache/syncope/core/logic/LogicInvocationHandler.java#L55 -- Francesco Chicchiriccò Tirasa - Open Source Excellence http://www.tirasa.net/ Member at The Apache Software Foundation Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail http://home.apache.org/~ilgrosso/
