Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Login and then load plugins based on permissions.
Login and then load plugins based on permissions. [message #334057] Fri, 16 January 2009 19:24 Go to next message
Eclipse UserFriend
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 #334081 is a reply to message #334057] Mon, 19 January 2009 17:59 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Check out http://eclipse-jaas.sourceforge.net/ which was looking at a
similar approach, I believe.

as for the sample transforms, in the past I was able to run them using
the instructions from http://wiki.eclipse.org/Equinox_Transforms

When you try and run, which plugins are in your workspace? What does
your transform file look like?

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 #334098 is a reply to message #334081] Tue, 20 January 2009 18:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

Hi Paul,


Thanks for the pointer to the eclipse-jaas , i will have a look at it.

For the XSLT Transform ,

I had the following plugins in my workspace

org.eclipse.osgi
org.eclipse.equinox.transforms.hook
org.eclipse.equinox.transforms.xslt

and my application plugin.

The xslt file had the following

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="actionSet[@id='com.seq.diagnostics.PlateActionSets]" >

<actionSet>

<xsl:attribute name="visible">true</xsl:attribute>

<xsl:copy-of select="node()|@*[not(name()='visible')]" />

</actionSet>

</xsl:template>

<xsl:template match="node()|@*">

<xsl:copy>

<xsl:apply-templates select="node()|@*"/>

</xsl:copy>

</xsl:template>

</xsl:stylesheet>

and the tranform.csv file had
com\.seq\.diagnostics,plugin\.xml,/actionSetDefault.xslt

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.



Kathir.


"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:gl2flb$ag5$1@build.eclipse.org...
> Check out http://eclipse-jaas.sourceforge.net/ which was looking at a
> similar approach, I believe.
>
> as for the sample transforms, in the past I was able to run them using the
> instructions from http://wiki.eclipse.org/Equinox_Transforms
>
> When you try and run, which plugins are in your workspace? What does your
> transform file look like?
>
> 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 #334099 is a reply to message #334098] Tue, 20 January 2009 18:51 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 #334100 is a reply to message #334099] Tue, 20 January 2009 22:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

I fixed the typo on the xslt.

The xslt plugin does not have anything except the registerSevice code

Properties properties = new Properties();
properties.put("equinox.transformerType", "xslt"); //$NON-NLS-1$
//$NON-NLS-2$

registration = context.registerService(URL.class.getName(),
context.getBundle().getEntry("/transform.csv"), properties); //$NON-NLS-1$

I had copied the same lines to my activator class but no luck.

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 #334101 is a reply to message #334099] Tue, 20 January 2009 23:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

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 #334102 is a reply to message #334101] Tue, 20 January 2009 23:40 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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] Wed, 21 January 2009 00:12 Go to previous messageGo to next message
Eclipse UserFriend
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 #334104 is a reply to message #334103] Wed, 21 January 2009 00:24 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Kathir schrieb:
> 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.
>

Sure but the same is true for the XSLT solution :-) and even JAAS I
guess because I could install bundles using the OSGi-Console/OSGi-API
myself any time.

In the end its always the same problem and the only real solution I know
of is to use a 3-tier setup and the application-server controls that the
user is not executing commands it is not allowed, not getting data it is
not allowed to see, ... . The client-side privileges are nice because it
helps users to only see actions, forms they are allowed to.

If someone highjacks the system the user can execute the command locally
but in the end the server denies to e.g. the creation. The same is true
for views, forms, ... if the system is hacked the user might see views
but because the server doesn't deliver data the user can't see any thing.

> How do we do this for the views and perspectives?.

I think expressions can also be used on activities but I'm not 100% sure.

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Login and then load plugins based on permissions. [message #334118 is a reply to message #334104] Wed, 21 January 2009 13:54 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Tom Schindl wrote:
>
> I think expressions can also be used on activities but I'm not 100% sure.

Yes, that was added in 3.4. With tweaks to your TriggerPointAdvisor,
expression enabled activities can be set up to be high priority (i.e. if
an expression based activity returns false it is disabled, no matter how
many other activities return true).

There's some information in Help>Help Contents>Platform Plug-in
Developer Guide and a starting point in bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=201052

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 #334119 is a reply to message #334100] Wed, 21 January 2009 14:00 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Kathir wrote:
> Properties properties = new Properties();
> properties.put("equinox.transformerType", "xslt"); //$NON-NLS-1$
> //$NON-NLS-2$
>
> registration = context.registerService(URL.class.getName(),
> context.getBundle().getEntry("/transform.csv"), properties); //$NON-NLS-1$
>
> I had copied the same lines to my activator class but no luck.

I think you said you started everything, that's probably the same as the
example:

osgi.bundles=org.eclipse.equinox.common@2\:start,org.eclipse.update.configurator@3\:start,org.eclipse.core.runtime@start,org.eclipse.equinox.transforms.xslt@1:\start,org.eclipse.equinox.transforms.xslt.plugin@1:\start

Where did you get the transforms bundles from? AFAIK they now live in
/cvsroot/rt - org.eclipse.equinox/components/bundles

--
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 #334120 is a reply to message #334119] Wed, 21 January 2009 14:21 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I checked out the 3 plugins,

org.eclipse.equinox.transforms.hook (/cvsroot/rt)
org.eclipse.equinox.transforms.xslt (/cvsroot/rt)
org.eclipse.osgi (/cvsroot/rt)
org.eclipse.equinox.transforms.xslt.plugin (/cvsroot/eclipse
equinox-incubator)

Then I updated the /org.eclipse.equinox.transforms.xslt.plugin/XSLT
Transform Launch.launch to include all the plugins and launched it. It
processed the CSV files in
org.eclipse.equinox.internal.transforms.CSVParser.parse(URL)

You can set a breakpoint in there to see if your CSV is getting parsed.

Then really, it's about getting your plugin to include all of the things
from *.xslt.plugin (which works).

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 #334135 is a reply to message #334120] Wed, 21 January 2009 21:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

Hi Paul,

I repeated the same steps to make the transforms work. But no luck for me.

I have attached the transform_source.zip which contains two plugins.
1.com.transform.example
2. com.transform.example.transformme

I did all the checkout and copied the xslt.plugin stuff to the
com.transform.example plugin Activator. But when i run the app i dont see
the actionset visible (coming from the com.transform.example.transformme )
on the application.

When i did the debug it parses the CSV file but the plugin.xml never gets
transformed. Please help !

BR,
Kathir.

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:gl7bkv$15g$1@build.eclipse.org...
>I checked out the 3 plugins,
>
> org.eclipse.equinox.transforms.hook (/cvsroot/rt)
> org.eclipse.equinox.transforms.xslt (/cvsroot/rt)
> org.eclipse.osgi (/cvsroot/rt)
> org.eclipse.equinox.transforms.xslt.plugin (/cvsroot/eclipse
> equinox-incubator)
>
> Then I updated the /org.eclipse.equinox.transforms.xslt.plugin/XSLT
> Transform Launch.launch to include all the plugins and launched it. It
> processed the CSV files in
> org.eclipse.equinox.internal.transforms.CSVParser.parse(URL)
>
> You can set a breakpoint in there to see if your CSV is getting parsed.
>
> Then really, it's about getting your plugin to include all of the things
> from *.xslt.plugin (which works).
>
> 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 23:15 Go to previous messageGo to next message
Eclipse UserFriend
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] Thu, 22 January 2009 00:13 Go to previous message
Eclipse UserFriend
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
>>>
>>>
>
>
Previous Topic:Eclipse and Ant tasks
Next Topic:[EUT] Class path list check
Goto Forum:
  


Current Time: Sun Dec 22 11:52:39 GMT 2024

Powered by FUDForum. Page generated in 0.05524 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top