Liferay- folder level permissions in documents and media portlet - liferay

I have created two users -
user1 and user2 in liferay portal and assigned separate role to each
users by creating a new role.
Also created two folders say test1 and test2 in documents and media
portlet.
I have granted permissions on these folders like user1 can view test1
folder & user2 can view test2 folder.
Problem I'm facing is whenever I upload documents to these folders I'm not able to see the document when I logged in as user1 or user2.
But if I logged in as administrator files are visible.
anyone suggest me on this.

Related

SharePoint: How to set permission on the folder so that a member can see their documents only in the folder?

Here is my requirement:
I want to create a folder called "My Documents".
This folder will share with multiple members, they have access to add, edit and view documents.
But the condition is that they can see their documents themselves and the document should not show to other members.
For example: Suppose user1 and user2 both have access to the folder "My Documents." If user1 creates doc1 only he can see the doc1 user2 can not see the user1's document. I mean Folder "My Documents" will be shared but space should be private.
In general SharePoint lists have item level permission and Document libraries don't have such facility available through UI but you can achieve this using PowerShell.
please follow : https://www.sharepointdiary.com/2014/03/set-item-level-permission-options-in-document-library.html
Note - The settings enabled through PowerShell applies to all documents inside the library not for any specific folder. And the settings are not applicable for Site owners and administrators.
This is not possible using the setup you have done so far. When you grant access to folder, all the files within that folder can be accessed by all users who have permissions on folder.
So, in general you have to grant unique permissions at file level instead of folder level so that other users will not have access to files.
Beware of the SharePoint limitations related to unique permissions in library. It is recommended to design library to have as few unique permissions as possible and remain below 5,000 in total.
Source: Unique security scopes per list or library
Granting unique permissions on multiple files/folder will be problematic to manage in future.
My recommendation:
If you are creating site/library structure from scratch, create separate document libraries (preferred) or folders for different set of users (maybe based on SharePoint/M365 groups than individual users).

Providing permissions to all the users in Linux

How to give all permissions to all the users in Linux? I know how to give permissions to single users but I don't know how to do it for all or multiple users. I'm kinda new at this.
In linux, each directory and file has 2 ownership info
user owner: who created the file
group owner: an entire group of user owning the file
And each directory and file has 3 set of permissions
user owner
group owner
other users : note: this is not 'all users' but 'other users', so if you are the user owner or member of group owner you are NOT part of other users
That said
you can give a permission to 'all others users' using last set of rwx permissions
you can give a permission to 'all users' using each set of permissions so both the owner and all members of the group owner and all other users can do what you want
| Be aware: do not use 777 (rwxrwxrwx) if is not absolutely necessary ! It opens to security concerns

Grant File Access on Demand

Is it possible to grant access to file for a user the moment he tries to access it?
Here's the condition:
User1 and User2 works for the same company.
User1 uploads a file to a document library that is used by multiple
different companies.
User2 tries to download the file that User1 uploaded.
Check if User2 is working for the same company as the user who
uploaded the file.
If yes, grant access.
The reason why I want to do this is because the document library is being used by different companies. The requirement is only users under the same company can access a file uploaded by that company.
Thanks,
You have to arrange the files in the Shared document library in different folders/Document sets.Create SharePoint groups for each company and assign folder level permission, such that users of each company will have permission to respective folders.This way user1 will upload document to his company folder and user 2 since belonging to same company will have access to it.
Alternatively you can also write event handler and make item level permission if you do not want to go for folder level permission.(NOT RECOMMENDED)
You can use folders to achieve this by creating a folder for each company and assigning permissions for user 1 and user 2 to their company folders.
OR
Create a column called company. Users that upload a file to the group can select what company this file belongs to. Based on that column, you can grant the permission to the correct company group. This can be done using workflow, event receiver or an app solution like this: http://truapps.portalfront.com/tru-permission-automation-for-sharepoint.html

View only permission for community/site members for Wiki portlet is not working in Liferay

I have created a site where I have set two roles. Role 1 has been set to user1 with all permissions for Wiki and "VIEW " permission for user2 in Role2. But when I login as user2, I am able to edit the Wiki page. How do I restrict the user2 from editing, adding and modifying the content on the wiki.
P.S: User1 and User2 are members of site.
As mentioned in this Liferay forum, I removed the UPDATE permission for site members, but it is not working
https://www.liferay.com/community/forums/-/message_boards/message/1199892
Thanks
You can change permission for wiki by wiki-article:

Liferay 6.1 customizing role and permission for different user in document and media portlet

I am new to liferay. I have one issue. I have 3 sub organizations (org A, B and C) each has each individual users. For exampla UA1, UB2, UC3 respectively.
Now I want to customize the permission of document and media portlet in such a way that UA1 can upload/ download his documents. But another User in Org A for example UA4 cannot access UA1's document. In the meanwhile Users UB2 and UC3 can see user UA1's document or add new document for her.
Can I achieve this my creating roles and permission? I have tried many combinations but it's not working.
How can I achieve this. Please do let me know. thanks
Here we have 2 cases
1. User of same organization can't view the image added by other user of same org.It can be achieved by creating an custom resource-action say (SCOPE_INDIVIDUAL) and manage it permission.
2.User of other organization can view the content can me manage by creating one role and define permission to it .

Resources