Organization administration portlet - liferay

I need to add portlet for organizations members and administrators. I have organization as a root and other organization inherited from it, it must done by a hook or what?
My second question I have added custom field "arabic name textfield" inside details section successfully but failed in making them required sections (validation) and not accept Arabic language
thank you
EDIT
I have added organization of many types from control panel I need to add a portlet for users in the organizations with their own roles without using control panel "users of organizations and administrators of organizations see a portlet to manage ...."
The second one I need to validate a custom field of organization form like name or email address.

Related

How to filter only site specific users in "Users and Organizations" in Liferay 7

Currently all the members created in liferay are displays to all.
How I can filter out the users based on the sites?
You should use Organization for distributed user management. Follow below step to achieve your requirement.
Add Organization
Goto your Site->Membership->Organization and select the organization you added
Add the user in the organization you want to give access for user management for the selected site and assign organization administration.
Login with the organization administration and you will see only site specific users.
hope this will help you.

Adding a new user to an organization in Liferay 6.2 GA2: Portal 'Default User Settings' doesn't work

Liferay 6.2.x should allow the automatic assignment of a user to an organization according to the answer by #Prakash and #AnkitP to this question Giving access to organization pages to new user.
The assignment is done in Control Panel > Portal settings > Users > Default User Associations.
According to the answer there should be an association for Organization, but in my fresh install of 6.2 GA2 the only organization association is Organization Sites. When I put an organization name in that field, new users were automatically assigned to the organization site (that was associated with the organization I entered) - but they were NOT added to the organization itself. Also, the assignment was immediate, instead of after the user logged in, which is when it should have happened according to the answer. I did check again after the user logged in as well, and the assignment to the organization is not made. The user is show as not belonging to any organization still.
So I am wondering if this is a change in behavior in the latest version, a setting I missed somewhere, or what. If it is the new intended behavior then I'm back to writing a hook.

How to deactivate a liferay user for particular organization?

I have a requirement to deactivate a user for a particular organization.In liferay we deactivate the user directly by control panel under users tool.if i deactivate,The user will deactivate in portal level so it is applicable to all organizations not to particular organization.so can i do manual code for this or is there any alternative by default?
User Management in Liferay is global - to the whole portal. You authenticate to the portal, thus a deactivated user can't be authenticated to the portal.
You can make users members of Organizations or site - and this membership (or other organization- or site-level roles) can be used to provide them with permissions.
If you want them to be able to sign in, don't deactivate them. If you don't want them to access a certain organization, make the content of that organization available to members only - and exclude the user from the members of that organization.
OK you could do this in code level ,
User singleUser=UserLocalServiceUtil.getUser(userId)
singleUser.setStatus(WorkflowConstants.STATUS_DENIED);
UserLocalServiceUtil.updateUser(singleUser);
So basically setting User Status to either WorkflowConstants.STATUS_DENIED, WorkflowConstants.STATUS_EXPIRED or WorkflowConstants.STATUS_INACTIVE will do the work of deactivating particular User.
But you need to research on the aftermath effect of these status field.

Where security role is used

I have created a form for a specific group of users in my CRM 2011 system. I want only them to be able to see this form. I can copy their a security role and set the form for this security role only, but I will have a a problem:
they are currently in a security role with another group of users. If I copy the security role, the will not longer see the specific customization's all over across the system.
I only want one form to be different from the others. Is there any way I can find all the forms that are enabled for the specific security role (in order to give the new role this rights too)?
Assumptions based on your question: You already have default form for the entity that is used by all users (All Users). You want to add an additional form to that entity that is only available to some of the users (Select Users). All Users are currently assigned a security role that gives them the necessary access to the system.
Create a new security role (Form Specific Role). You don't have to give this role any privileges just a name.
Assign the Select Users the Form Specific Role. Do NOT remove their other security role(s).
Add the new form the entity, Restricted Form.
Highlight the new form and click Enable Security Roles. Select the option Display only to these selected security roles and select the Form Specific Role you created in step # 1. Make sure Enabled for fallback is unchecked. Click Ok.
From the forms list Form Order and select Main Form Set (or the appropriate form type if you are working on a Mobile or Quick Create Form.
Use the Up/Down arrows to make the new, Restricted Form, the top choice.
Save and Publish all changes.
Now whenever a user that has been assigned the security role accesses this entity their default form choice will be the Restricted Form. There will be NO impact to any other forms they are accessing or any of their privileges in the rest of the system, as required by your problem statement.

How can I decouple a group from the related organization

I have an organization in which I created a site. So the site belongs to the organization, as stated in the Site Memberships page:
This site belongs to Jobyourself which is an organization of type booster-club. All users of Jobyourself are automatically members of the site and site roles are automatically assigned to them based on the organization roles they have in Jobyourself as shown in the table below.
I would now like to delete the organization, but keep the site. How can I decouple the group from the related organization (programmatically or through the control panel) ?
I am using liferay 6.1 GA3.
Best regards,
Alain
Alain, From Control Panel navigate to your Site which you want to decouple, From Action button click on Site Membership you should see Organization Tab where you can remove the organization linking.. Hope this helps.

Resources