Forums de discussion

Default User Permissions in Portal-ext?

Chris Chan, modifié il y a 12 années.

Default User Permissions in Portal-ext?

Junior Member Publications: 39 Date d'inscription: 23/07/10 Publications récentes
Hi everyone,

Is there a way to default certain user permissions to be enabled/disabled via the portal-ext.properties or anything else when adding a new user to the portal?
In my case, I'm trying to have all users have the permission to impersonate enabled when they are created but I don't see anything in the Portal Properties wiki for Liferay 6.0.5.

Any help would be GREATLY appreciated.

Thanks,
Chris
thumbnail
Suresh Nimmakayala, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Liferay Master Publications: 690 Date d'inscription: 18/08/04 Publications récentes
Chris

1)you can create a role and assign the permissions. assign the role for default user creations in liferay controlpanel settings

or

2)
add a hook and overide UserLocalService,

<hook>
<service>
<service-type>com.liferay.portal.service.UserLocalService</service-type>
<service-impl> com.integratingstuff.liferay.hooks.CustomUserLocalServiceImpl</service-impl>
</service>
</hook>


Cheers
Suresh
Chris Chan, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Junior Member Publications: 39 Date d'inscription: 23/07/10 Publications récentes
Hey Suresh,

Thanks for your reply.
1) I didn't think you could set roles to have impersonate permission? I didn't see that option when in the Actions > Permissions menu for a role. Am I looking in the wrong location?

2) By overriding the UserLocalService, will calling the serivce via webservice still use the custom hook or will I have to create a custom service for it?

Thanks again,
Chris
thumbnail
Raju OO7, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Regular Member Publications: 239 Date d'inscription: 27/04/10 Publications récentes
Chris Chan:
Hi everyone,

Is there a way to default certain user permissions to be enabled/disabled via the portal-ext.properties or anything else when adding a new user to the portal?
In my case, I'm trying to have all users have the permission to impersonate enabled when they are created but I don't see anything in the Portal Properties wiki for Liferay 6.0.5.

Any help would be GREATLY appreciated.

Thanks,
Chris



U can create a Regular Type role and in its Users Type u can set the impersonate permission.

and for attaching this role as default roles of all users, Go to Control Panel -> settings -> Users -> Default User Associations .. Add the newly created role to the Role field. If u wish u can apply changes to existing users also..
Chris Chan, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Junior Member Publications: 39 Date d'inscription: 23/07/10 Publications récentes
Raju OO7:


U can create a Regular Type role and in its Users Type u can set the impersonate permission.

and for attaching this role as default roles of all users, Go to Control Panel -> settings -> Users -> Default User Associations .. Add the newly created role to the Role field. If u wish u can apply changes to existing users also..



Hey Raju,

Thanks for your response.
I tried creating a new role of Regular Type and when I go to the Define Permissions and select Users, I only see options for:
  • Access in Control Panel
  • Configuration
  • Export User
  • View


Am I looking in the right place?

Thanks!
Chris
thumbnail
Raju OO7, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Regular Member Publications: 239 Date d'inscription: 27/04/10 Publications récentes
Chris Chan:
Raju OO7:


U can create a Regular Type role and in its Users Type u can set the impersonate permission.

and for attaching this role as default roles of all users, Go to Control Panel -> settings -> Users -> Default User Associations .. Add the newly created role to the Role field. If u wish u can apply changes to existing users also..



Hey Raju,

Thanks for your response.
I tried creating a new role of Regular Type and when I go to the Define Permissions and select Users, I only see options for:
  • Access in Control Panel
  • Configuration
  • Export User
  • View


Am I looking in the right place?

Thanks!
Chris



There are 4 divisions in Add Permission Combobox. portal, content, applications, control panel...

what u selected is control panel user properties... u need to choose portal level user permission system.. check the last step....

I tried creating a new role of Regular Type and when I go to the Define Permissions and select Users from the Poral section
Chris Chan, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Junior Member Publications: 39 Date d'inscription: 23/07/10 Publications récentes
Raju OO7:

There are 4 divisions in Add Permission Combobox. portal, content, applications, control panel...

what u selected is control panel user properties... u need to choose portal level user permission system.. check the last step....

I tried creating a new role of Regular Type and when I go to the Define Permissions and select Users from the Poral section


Thanks Raju, that worked out perfectly!
Cheers!
thumbnail
Rojalin Patri, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Expert Publications: 287 Date d'inscription: 22/03/11 Publications récentes
Chris Chan:
Raju OO7:

There are 4 divisions in Add Permission Combobox. portal, content, applications, control panel...

what u selected is control panel user properties... u need to choose portal level user permission system.. check the last step....

I tried creating a new role of Regular Type and when I go to the Define Permissions and select Users from the Poral section



Hi Raju,
could you please give the step by step procedure for this.i have a similar requirement ,i created the user "test" and a role "regular type" using the admin login.Then i navigated to "Define permissions" and i get "portal","community","organization","password policy","user" and "user groups" sections with a number of drop down lists.which one i should select to give the user permission to impersonate his account?????????
Under portal section i got only portal as a option for the "add user" drop down.
Please guide me...........

Thanks
Rojalin
Chris Chan, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Junior Member Publications: 39 Date d'inscription: 23/07/10 Publications récentes
Rojalin Patri:

Hi Raju,
could you please give the step by step procedure for this.i have a similar requirement ,i created the user "test" and a role "regular type" using the admin login.Then i navigated to "Define permissions" and i get "portal","community","organization","password policy","user" and "user groups" sections with a number of drop down lists.which one i should select to give the user permission to impersonate his account?????????
Under portal section i got only portal as a option for the "add user" drop down.
Please guide me...........

Thanks
Rojalin


Hey Rojalin,
You're in the right spot. In that drop down list, within the "portal" section, you should see an option for "User".
When you select that option, the page will then display a list of permissions you can apply, one of them being the impersonate permission.

Hope that helps,
Chris
thumbnail
Rojalin Patri, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Expert Publications: 287 Date d'inscription: 22/03/11 Publications récentes
Chris Chan:
Rojalin Patri:


In that drop down list, within the "portal" section, you should see an option for "User".
When you select that option, the page will then display a list of permissions you can apply, one of them being the impersonate permission.

Hi Chris,
thanks for your reply.but i m still help less.in that drop down i am getting only one option that is "portal".Upon selecting that option the permission is getting added to the role but i am not any display a list of permissions or impersonate permission over there.....
Am i not in a right place or i m doing something wrong???????????
Please guide me..........
I am attaching the screen shot to explain the problem clearly....
Thanks
Rojalin

Pièces jointes:

thumbnail
Mani kandan, modifié il y a 12 années.

RE: Default User Permissions in Portal-ext?

Expert Publications: 492 Date d'inscription: 15/09/10 Publications récentes
Hi Rojalin,
You are in correct place.

In your screenshot you can find "Portal" "Community" sections right?

Below that you can find many sections like "Organization" "Password Policy" etc.

Then last section is "User Group" , above the "User Group" section you can find "User" section.

There you will find "Impersonate" action. Then select the "Portal" scope for that and save it.

See the attachment image.

Pièces jointes: