Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Authorizing Perspectives
icon5.gif  Authorizing Perspectives [message #489109] Thu, 01 October 2009 10:18 Go to next message
Torsten Beuck is currently offline Torsten Beuck
Messages: 38
Registered: July 2009
Member
Hi,

our RCP application consists of many different perspectives reflecting different business use cases and processes. These perspectives are authorized such that the current user may navigate only to some of these perspectives depending on his rights.

The workbench state is stored during shutdown. This state also holds the currently active perspective. But if after user 'A' has worked in perspective 'x' another user 'B' (not authorized for perspective 'x' ) starts the application he will see perspective 'x' because the workbench has restored its former state and with it the last active perspective.

Until now we didn't find a way to hook into the restore process to check if the last perspective is authorized for the current user.

Do you have any idea how to work around this problem?

- Torsten
Re: Authorizing Perspectives [message #489817 is a reply to message #489109] Tue, 06 October 2009 02:12 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
Torsten Beuck wrote:
> Hi,
>
> our RCP application consists of many different perspectives reflecting
> different business use cases and processes. These perspectives are
> authorized such that the current user may navigate only to some of these
> perspectives depending on his rights.
>
> The workbench state is stored during shutdown. This state also holds the
> currently active perspective. But if after user 'A' has worked in
> perspective 'x' another user 'B' (not authorized for perspective 'x' )
> starts the application he will see perspective 'x' because the workbench
> has restored its former state and with it the last active perspective.
>
> Until now we didn't find a way to hook into the restore process to check
> if the last perspective is authorized for the current user.
>
> Do you have any idea how to work around this problem?
>
> - Torsten

You can disable the saving by WorkbenchConfigurer.setSaveAndRestore(false)

- Prakash

Platform UI Team, IBM
http://blog.eclipse-tips.com
Re: Authorizing Perspectives [message #490019 is a reply to message #489109] Tue, 06 October 2009 17:55 Go to previous messageGo to next message
maarten meijer is currently offline maarten meijer
Messages: 145
Registered: July 2009
Senior Member
Hi Torsten,

I have a similar problem with Perspectives needing filtering based on
user authorization, but also needing the ability to store there own
modified perspectives. I worked out the first with a parallel set of
Perspective-SecurityFunction (and same for views and action sets)
references using an extension point.

For the restore problem, I recommend relocating the user home directory
to the OS users hoem directory, assuming a different user is also a
different OS user. You can do this with the -data directive in
eclipse.ini. I use -data @user.home/bhs-client/ so the workspace stuff
like logs and prefs is stored there.

Works for me...

Maarten Meijer
eclipse trainer & consultant

Torsten Beuck schreef:
> Do you have any idea how to work around this problem?
>
> - Torsten
Re: Authorizing Perspectives [message #490652 is a reply to message #489109] Fri, 09 October 2009 11:11 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6850
Registered: July 2009
Location: Ottawa
Senior Member

Having the workspace per-user as suggested earlier will help with most cases, except constantly running the application in the same user.

The other places you can do cleanup (like close an open perspective) before the system is fully up is org.eclipse.ui.application.WorkbenchWindowAdvisor.postWindow Open() or org.eclipse.ui.application.WorkbenchAdvisor.postStartup()

PW


Previous Topic:p2.inf/addRepository and no write permissions in c:\program files
Next Topic:Programmatically DB access connection via DTP on Eclipse 3.5 (Galileo)
Goto Forum:
  


Current Time: Wed Apr 16 23:51:57 EDT 2014

Powered by FUDForum. Page generated in 0.01594 seconds