You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Calin Avasilcai <ca...@gmail.com> on 2010/08/25 09:25:22 UTC

Jetspeed2(2.0.1) custom user

I need to be able to mark a jetspeed user as "special", and prevent an admin
to delete this user.

My idea was to add a binary column in security_principal table and use the
information in this column in user-details.jsp from j2-admin portlet
application, in order to decide to show or not the delete button.But it
seams this is not that simple as I thought it would be.

First of all, is this approach a good one, or is there a simpler solution?
And if this is the way to go, how can I pass the special flag in the jsp?


-- 
Thanks,
Calin

Re: Jetspeed2(2.0.1) custom user

Posted by Ron Wheeler <rw...@artifact-software.com>.
  On 25/08/2010 3:25 AM, Calin Avasilcai wrote:
> I need to be able to mark a jetspeed user as "special", and prevent an admin
> to delete this user.
>
> My idea was to add a binary column in security_principal table and use the
> information in this column in user-details.jsp from j2-admin portlet
> application, in order to decide to show or not the delete button.But it
> seams this is not that simple as I thought it would be.
>
> First of all, is this approach a good one, or is there a simpler solution?
> And if this is the way to go, how can I pass the special flag in the jsp?
>
>
You might look at assigning the person a role of "Special"

Ron

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Jetspeed2(2.0.1) custom user

Posted by David Sean Taylor <d....@onehippo.com>.
On Wed, Aug 25, 2010 at 12:25 AM, Calin Avasilcai <ca...@gmail.com> wrote:
> I need to be able to mark a jetspeed user as "special", and prevent an admin
> to delete this user.
>
> My idea was to add a binary column in security_principal table and use the
> information in this column in user-details.jsp from j2-admin portlet
> application, in order to decide to show or not the delete button.But it
> seams this is not that simple as I thought it would be.
>
> First of all, is this approach a good one, or is there a simpler solution?
> And if this is the way to go, how can I pass the special flag in the jsp?
>
>
Which version are you using? There are no JSPs in the 2.2 User
Manager, its Wicket. I think this could be configured with something
like:


#if (!portletRequest.isUserInRole("admin"))
			<input type="submit" wicket:id="remove" />			
#end

or even turned into a generalized feature...

Of course the above example won't work in Wicket. Actually I think you
need a conditional component. I dont use Wicket myself, so I'd have to
dig to get you an answer. Be better if some Wicket guru popped up with
a wise answer ... :)

IMO seems it would be lots easier for an portal integration framework
to use something a little more mainstream like JSP or vm, but what do
i know

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org