| Home » Eclipse Projects » Eclipse Platform » Login and then load plugins based on permissions.
 Goto Forum:| 
| Login and then load plugins based on permissions. [message #334057] | Fri, 16 January 2009 14:24  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: kathir.atc.tcs.com 
 Hi,
 I am trying to create an RCP application wher the user will login and then
 based on his role the application functionalities are loaded.
 I would like to use the equinox security implementation to do the login but
 i am not sure how to load the plugin functionalities based on his role.
 
 Here are the two approaches i thought of.
 
 First Approach :
 
 1. Application plugin - Login ( want to use Equinox Security )
 
 2. Retrieve the Role of the user
 
 3. Set the activities ( Eclipse Activity ) based on the Role.
 
 Second Approach :
 
 1. Application plugin - Login ( Equinox Security )
 
 2. Retrieve the Role of the user and write the XSLT Transform files.
 
 I do not know whether the second approach is right or not because i could nt
 really get the sample xslt transform from the eclipse cvs to work and didnt
 get any response from the newsgroup either.
 So if anyone could throw some light on this, that will really help me
 understand the Equinox Secuirty and Transform.
 
 Thanks,
 Kathir.
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Re: Login and then load plugins based on permissions. [message #334102 is a reply to message #334101] | Tue, 20 January 2009 18:40   |  | 
| Eclipse User  |  |  |  |  | Hi, 
 We are simply extending the expression framework and add declartive
 checks to user privileges. You can look at an example application i've
 created [1,2,3].
 
 Tom
 
 [1] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/plugin.xml
 [2] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/src/at/bestsolution/socce r/ui/internal/LoginSourceProvider.java
 [3] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/plugin.x ml
 
 Kathir schrieb:
 > I have looked into the eclipse-jaas from the sourceforge. Its basically
 > installing plugins if the user is a authorized user.
 > But in my case, i have to disable commands and views based on the user
 > permissions. And also i cannot create plugins for each view and command,
 > that will get me 100s of plugins.
 >
 > I think, if i can get the xslt constructed based on the User Permissions ,
 > the application will have the authroized extensions installed in the
 > application.
 > Please correct me if i am wrong on this.
 >
 > Kathir.
 >
 >
 > "Paul Webster" <pwebster@ca.ibm.com> wrote in message
 > news:gl573i$4ka$1@build.eclipse.org...
 >> Kathir wrote:
 >>> Hi Paul,
 >>> <xsl:stylesheet version="1.0"
 >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 >>>
 >>> <xsl:template
 >>> match="actionSet[@id='com.seq.diagnostics.PlateActionSets]" >
 >> ^^^ typo?
 >>
 >>
 >>
 >>> I had the
 >>>
 >>>  osgi.framework.extensions=org.eclipse.equinox.transforms.hoo k
 >>>
 >>> and the start level for the xslt and my application plugin with @1\:start
 >>>
 >>> But when i run the application i dont see the actionset visible.
 >>>
 >> Did you copy out all of the working code from
 >> org.eclipse.equinox.transforms.xslt.plugin?  That's the plugin that uses
 >> org.eclipse.equinox.transforms.hook, org.eclipse.equinox.transforms.xslt
 >> to do the transform.
 >>
 >> PW
 >>
 >> --
 >> Paul Webster
 >> http://wiki.eclipse.org/Platform_Command_Framework
 >> http://wiki.eclipse.org/Command_Core_Expressions
 >> http://wiki.eclipse.org/Menu_Contributions
 >> http://wiki.eclipse.org/Menus_Extension_Mapping
 >>  http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
 >
 >
 |  |  |  |  | 
| Re: Login and then load plugins based on permissions. [message #334103 is a reply to message #334102] | Tue, 20 January 2009 19:12   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: kathir.atc.tcs.com 
 Hi Tom,
 
 The LoginSourceProvider set the SOURCE_USER_GROUP to the user's group and
 based on the this group type , the CommandHandler is enabled or disabled.  -
 Will it be possible to write a trojan plugin to make this commands enabled ,
 i am just thinking whether it will be possible.
 
 How do we do this for the views and perspectives?.
 
 BR,
 Kathir.
 
 
 "Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
 news:gl5ne1$e3g$1@build.eclipse.org...
 > Hi,
 >
 > We are simply extending the expression framework and add declartive
 > checks to user privileges. You can look at an example application i've
 > created [1,2,3].
 >
 > Tom
 >
 > [1] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/plugin.xml
 > [2] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/src/at/bestsolution/socce r/ui/internal/LoginSourceProvider.java
 > [3] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/plugin.x ml
 >
 > Kathir schrieb:
 >> I have looked into the eclipse-jaas from the sourceforge. Its basically
 >> installing plugins if the user is a authorized user.
 >> But in my case, i have to disable commands and views based on the user
 >> permissions. And also i cannot create plugins for each view and command,
 >> that will get me 100s of plugins.
 >>
 >> I think, if i can get the xslt constructed based on the User Permissions
 >> ,
 >> the application will have the authroized extensions installed in the
 >> application.
 >> Please correct me if i am wrong on this.
 >>
 >> Kathir.
 >>
 >>
 >> "Paul Webster" <pwebster@ca.ibm.com> wrote in message
 >> news:gl573i$4ka$1@build.eclipse.org...
 >>> Kathir wrote:
 >>>> Hi Paul,
 >>>> <xsl:stylesheet version="1.0"
 >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 >>>>
 >>>> <xsl:template
 >>>> match="actionSet[@id='com.seq.diagnostics.PlateActionSets]" >
 >>> ^^^ typo?
 >>>
 >>>
 >>>
 >>>> I had the
 >>>>
 >>>>  osgi.framework.extensions=org.eclipse.equinox.transforms.hoo k
 >>>>
 >>>> and the start level for the xslt and my application plugin with
 >>>> @1\:start
 >>>>
 >>>> But when i run the application i dont see the actionset visible.
 >>>>
 >>> Did you copy out all of the working code from
 >>> org.eclipse.equinox.transforms.xslt.plugin?  That's the plugin that uses
 >>> org.eclipse.equinox.transforms.hook, org.eclipse.equinox.transforms.xslt
 >>> to do the transform.
 >>>
 >>> PW
 >>>
 >>> --
 >>> Paul Webster
 >>> http://wiki.eclipse.org/Platform_Command_Framework
 >>> http://wiki.eclipse.org/Command_Core_Expressions
 >>> http://wiki.eclipse.org/Menu_Contributions
 >>> http://wiki.eclipse.org/Menus_Extension_Mapping
 >>>  http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
 >>
 >>
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Re: Login and then load plugins based on permissions. [message #334138 is a reply to message #334102] | Wed, 21 January 2009 18:15   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: kathir.atc.tcs.com 
 Hi Tom,
 I followed the expressions approach to enable/disable commands. But it does
 not seem to work.
 
 I used enabledWhen insteadof activeWhen but no matter what i set to the
 variable it never gets enabled.
 
 
 <enabledWhen>
 
 <with
 
 variable="com.sequenom.ivd.users.factory.ADD_USER">
 
 <equals
 
 value="true">
 
 </equals>
 
 </with>
 
 </enabledWhen>
 
 I returned the map with com.sequenom.ivd.users.factory.ADD_USER = true but
 the command is not enabled. What am i doing wrong.
 
 Kathir.
 
 "Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
 news:gl5ne1$e3g$1@build.eclipse.org...
 > Hi,
 >
 > We are simply extending the expression framework and add declartive
 > checks to user privileges. You can look at an example application i've
 > created [1,2,3].
 >
 > Tom
 >
 > [1] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/plugin.xml
 > [2] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/src/at/bestsolution/socce r/ui/internal/LoginSourceProvider.java
 > [3] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/plugin.x ml
 >
 > Kathir schrieb:
 >> I have looked into the eclipse-jaas from the sourceforge. Its basically
 >> installing plugins if the user is a authorized user.
 >> But in my case, i have to disable commands and views based on the user
 >> permissions. And also i cannot create plugins for each view and command,
 >> that will get me 100s of plugins.
 >>
 >> I think, if i can get the xslt constructed based on the User Permissions
 >> ,
 >> the application will have the authroized extensions installed in the
 >> application.
 >> Please correct me if i am wrong on this.
 >>
 >> Kathir.
 >>
 >>
 >> "Paul Webster" <pwebster@ca.ibm.com> wrote in message
 >> news:gl573i$4ka$1@build.eclipse.org...
 >>> Kathir wrote:
 >>>> Hi Paul,
 >>>> <xsl:stylesheet version="1.0"
 >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 >>>>
 >>>> <xsl:template
 >>>> match="actionSet[@id='com.seq.diagnostics.PlateActionSets]" >
 >>> ^^^ typo?
 >>>
 >>>
 >>>
 >>>> I had the
 >>>>
 >>>>  osgi.framework.extensions=org.eclipse.equinox.transforms.hoo k
 >>>>
 >>>> and the start level for the xslt and my application plugin with
 >>>> @1\:start
 >>>>
 >>>> But when i run the application i dont see the actionset visible.
 >>>>
 >>> Did you copy out all of the working code from
 >>> org.eclipse.equinox.transforms.xslt.plugin?  That's the plugin that uses
 >>> org.eclipse.equinox.transforms.hook, org.eclipse.equinox.transforms.xslt
 >>> to do the transform.
 >>>
 >>> PW
 >>>
 >>> --
 >>> Paul Webster
 >>> http://wiki.eclipse.org/Platform_Command_Framework
 >>> http://wiki.eclipse.org/Command_Core_Expressions
 >>> http://wiki.eclipse.org/Menu_Contributions
 >>> http://wiki.eclipse.org/Menus_Extension_Mapping
 >>>  http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
 >>
 >>
 |  |  |  |  | 
| Re: Login and then load plugins based on permissions. [message #334141 is a reply to message #334138] | Wed, 21 January 2009 19:13  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: kathir.atc.tcs.com 
 and if i use activeWhen it is always enabled.
 
 
 <activeWhen>
 
 <with
 
 variable="com.sequenom.ivd.users.factory.ADD_USER">
 
 <equals
 
 value="true">
 
 </equals>
 
 </with>
 
 </activeWhen>
 
 
 
 in the source provider
 
 
 
 public static final String ADD_USER =
 "com.sequenom.ivd.users.factory.ADD_USER";
 
 public Map getCurrentState()
 
 {
 
 HashMap<String, Object> map = new HashMap<String, Object>();
 
 map.put(ADD_USER, "false");
 
 return map;
 
 }
 
 IT is enabled in this case even though i return false for the variable.
 
 
 "Kathir" <kathir@atc.tcs.com> wrote in message
 news:gl8abd$7a4$1@build.eclipse.org...
 > Hi Tom,
 > I followed the expressions approach to enable/disable commands. But it
 > does not seem to work.
 >
 > I used enabledWhen insteadof activeWhen but no matter what i set to the
 > variable it never gets enabled.
 >
 >
 > <enabledWhen>
 >
 > <with
 >
 > variable="com.sequenom.ivd.users.factory.ADD_USER">
 >
 > <equals
 >
 > value="true">
 >
 > </equals>
 >
 > </with>
 >
 > </enabledWhen>
 >
 > I returned the map with com.sequenom.ivd.users.factory.ADD_USER = true but
 > the command is not enabled. What am i doing wrong.
 >
 > Kathir.
 >
 > "Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
 > news:gl5ne1$e3g$1@build.eclipse.org...
 >> Hi,
 >>
 >> We are simply extending the expression framework and add declartive
 >> checks to user privileges. You can look at an example application i've
 >> created [1,2,3].
 >>
 >> Tom
 >>
 >> [1] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/plugin.xml
 >> [2] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui/src/at/bestsolution/socce r/ui/internal/LoginSourceProvider.java
 >> [3] http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/plugin.x ml
 >>
 >> Kathir schrieb:
 >>> I have looked into the eclipse-jaas from the sourceforge. Its basically
 >>> installing plugins if the user is a authorized user.
 >>> But in my case, i have to disable commands and views based on the user
 >>> permissions. And also i cannot create plugins for each view and command,
 >>> that will get me 100s of plugins.
 >>>
 >>> I think, if i can get the xslt constructed based on the User Permissions
 >>> ,
 >>> the application will have the authroized extensions installed in the
 >>> application.
 >>> Please correct me if i am wrong on this.
 >>>
 >>> Kathir.
 >>>
 >>>
 >>> "Paul Webster" <pwebster@ca.ibm.com> wrote in message
 >>> news:gl573i$4ka$1@build.eclipse.org...
 >>>> Kathir wrote:
 >>>>> Hi Paul,
 >>>>> <xsl:stylesheet version="1.0"
 >>>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 >>>>>
 >>>>> <xsl:template
 >>>>> match="actionSet[@id='com.seq.diagnostics.PlateActionSets]" >
 >>>> ^^^ typo?
 >>>>
 >>>>
 >>>>
 >>>>> I had the
 >>>>>
 >>>>>  osgi.framework.extensions=org.eclipse.equinox.transforms.hoo k
 >>>>>
 >>>>> and the start level for the xslt and my application plugin with
 >>>>> @1\:start
 >>>>>
 >>>>> But when i run the application i dont see the actionset visible.
 >>>>>
 >>>> Did you copy out all of the working code from
 >>>> org.eclipse.equinox.transforms.xslt.plugin?  That's the plugin that
 >>>> uses
 >>>> org.eclipse.equinox.transforms.hook,
 >>>> org.eclipse.equinox.transforms.xslt
 >>>> to do the transform.
 >>>>
 >>>> PW
 >>>>
 >>>> --
 >>>> Paul Webster
 >>>> http://wiki.eclipse.org/Platform_Command_Framework
 >>>> http://wiki.eclipse.org/Command_Core_Expressions
 >>>> http://wiki.eclipse.org/Menu_Contributions
 >>>> http://wiki.eclipse.org/Menus_Extension_Mapping
 >>>>  http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
 >>>
 >>>
 >
 >
 |  |  |  | 
 
 
 Current Time: Fri Oct 31 09:07:29 EDT 2025 
 Powered by FUDForum . Page generated in 0.31846 seconds |