Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » how to have a secure perspective?
how to have a secure perspective? [message #133175] Sat, 16 May 2009 22:13 Go to next message
David Donohue is currently offline David DonohueFriend
Messages: 104
Registered: July 2009
Senior Member
Hello!
I would like to have 1 perspective that is public-accessible and another
that is secure (functioning like the admin console). So when a user is
logged in, then a link to the admin perspective appears.
How can I do that?
Thanks for any direction!
David Donohue
Re: how to have a secure perspective? [message #133206 is a reply to message #133175] Sun, 17 May 2009 15:09 Go to previous messageGo to next message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi David,
one possible approach is to implement your own perspective switcher. To
see how to do this just take a look at the bundle
org.eclipse.rap.design.business. But notice that the perspective itself
would not be secure. But you can implement a user validation in the
IPerspectiveFactory.createInitialLayout method. I don't realy know if
this will work. Good luck and let us know if you have any solution.

Regards Holger


On 2009-05-17 00:13:02 +0200, dd@daviddonohue.com (David Donohue) said:

> Hello!
> I would like to have 1 perspective that is public-accessible and
> another that is secure (functioning like the admin console). So when a
> user is logged in, then a link to the admin perspective appears.
> How can I do that?
> Thanks for any direction!
> David Donohue


--
-----------------------------------------

http://eclipsesource.com

http://twitter.com/eclipsesource
Re: how to have a secure perspective? [message #133259 is a reply to message #133206] Mon, 18 May 2009 17:45 Go to previous messageGo to next message
Austin Riddle is currently offline Austin RiddleFriend
Messages: 128
Registered: July 2009
Senior Member
Hello David,

We have accomplished what you desire via activity bindings. Now, this is
not an orthodox use of activity bindings as they were not intended for
this purpose, but nonetheless our permissions model is tied to the
employment of activity patterns. We have found it to be more than
adequate for hiding perspectives, views, actions, etc. that are for
admins. Hope this helps. If you need some code snippets let me know.


BTW: Congratulations on your success with the Google visualizations. I
have been playing with them, and you and Ivan have done a great job.
Re: how to have a secure perspective? [message #133270 is a reply to message #133259] Tue, 19 May 2009 04:02 Go to previous messageGo to next message
David Donohue is currently offline David DonohueFriend
Messages: 104
Registered: July 2009
Senior Member
Thanks, Holger and Austin for your replies!

Austin, I was unaware of Eclipse Activities but just read the help
documentation on them. Neat! Yes, that would be great if you could
kindly share some code to illustrate how you are enforcing security via
Activities. I am also curious why you took this approach to secure
aspects (perspectives, views, etc.) of your RAP applicaiton.

Does SWT/RCP/RAP not offer a more official means of securing some aspects
of an app? If not, perhaps your approach becomes the best practice and
should be documented? After all, it is a fairly fundamental requirement
of web apps to permit an admin interface.

And I am delighted that you have found the Google visualization API
widgets usable!
Best,
David Donohue
Re: how to have a secure perspective? [message #133296 is a reply to message #133270] Tue, 19 May 2009 07:35 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 338
Registered: July 2009
Senior Member
Hi David,

take a look at this:
http://wiki.eclipse.org/RAP/FAQ#How_to_use_expression-based_ activities_for_role-based_access_control.3F

Cheers
Benny

David Donohue wrote:
> Thanks, Holger and Austin for your replies!
> Austin, I was unaware of Eclipse Activities but just read the help
> documentation on them. Neat! Yes, that would be great if you could
> kindly share some code to illustrate how you are enforcing security via
> Activities. I am also curious why you took this approach to secure
> aspects (perspectives, views, etc.) of your RAP applicaiton.
> Does SWT/RCP/RAP not offer a more official means of securing some
> aspects of an app? If not, perhaps your approach becomes the best
> practice and should be documented? After all, it is a fairly
> fundamental requirement of web apps to permit an admin interface.
>
> And I am delighted that you have found the Google visualization API
> widgets usable!
> Best,
> David Donohue
>
>


--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
Re: how to have a secure perspective? [message #133536 is a reply to message #133296] Tue, 19 May 2009 14:19 Go to previous message
Austin Riddle is currently offline Austin RiddleFriend
Messages: 128
Registered: July 2009
Senior Member
Thanks for sharing the FAQ link Benny.

David,

One difficulty that we ran into with activities is that you must be very
disciplined with how ids for ui elements and activity patterns are defined
in the plugin.xml. Because of the way ui elements are matched by activity
patterns it is easy for some to slip through the cracks. What I mean is
that if you are not careful, enabling/disabling a particular activity may
unlock/lock other activities because of the way the patterns and ids are
defined. This is particularly easy when you define one activity binding
that applies to many ui elements. We established some conventions for ids
that have served us well. Also, you will inevitably need to manage
activities programmatically, which can be done using:
PlatformUI.getWorkbench().getActivitySupport();
Previous Topic:TableViewer + ViewerSorter
Next Topic:Strange behaviour using ElementListSelectionDialog
Goto Forum:
  


Current Time: Fri Apr 19 19:17:45 GMT 2024

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

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

Back to the top