Directus 9, how can I set permissions on Files? - directus

I have an App with private messages, the messages are stored in a directus collections, each item has multiple Attachments (files).
How can I restrict access to these files for other users, that are not in the Conversation?
I have tried set up a usergroup for each conversation, but I think its not the best way to do it.
And another question, how can I set the "mine" permission on files?

From setting menu -> roles and permissions
Select public roles then system collections
At files collection allow public to view permission
Now any public user can download your file.
https://your-directus.com/assets/<file-id>?download

Related

Microsoft Graph API to overwrite/delete permission for drive items

Is there any way to overwrite permission to share drive item to specific users only?
e.g.
Case 1:
File1 is shared with User1. I want to share File1 to User2 only using graph api which can also remove User1 from share list.
Currently, Graph APIs are available to add the permission and to delete permission separately.
But, I need to deal with a lot of files to update the permissions and for each file I need to take difference of permissions (User list already shared and User list needs to be updated to share item) for drive item to delete the permission to remove User from share list.
Case 2:
Another case is to make File private to the user. Is there any way to make file private directly(possibly single api call)?. Currently, I have to delete each user permission from shared list(5 calls to delete permissions if file is shared with 5 users). Again, I am dealing with a lot of files.
[Edited]
More info: My use case is for Direct Access permission and Not link-based permission.
According to your scenario, I think you can create a sharelink for a file by using the following API: /sites/{siteId}/drive/items/{itemId}/createLink and grant access to sharelink accordingly.
Refer to the documentation here on accessing shared drive items.
If this doesn't help, consider raising user voice for your specific scenario so that it goes into our backlog.

Share user defaults between users

I'm using user defaults to store my app data.
I have some global data that is relevant for all users on the same machine.
How can I share this data between them?
NSUserDefaults' initWithSuiteName did not work.
The only workaround I found it to write to a hidden file in the root folder, but that is too visible to the users.
You can use the /Users/Shared directory like iTunes & the App Store.
The closest you could do is to make all of the users be members of a single group, then make a group writable file with the shared data. It could be a plist and it could even be accessed via the defaults API, assuming you don't need multiple simultaneous write access.
You could use CFPreferences APIs instead of NSUserDefaults, passing kCFPreferencesAnyUser as the user name parameter. However, setting defaults for all users requires admin privileges.

Sharepoint permission level for list

I have to create a list with different permission levels. I can see my list, but my teammates can't, but my manager can see all list.
I tried to use filters, but I couldn't define a filter for my manager. I was able to filter the list between teammates.
Is there any way to create groups of permissions. For example, the owners can see the full list, but the members can see their own part
Access to lists or items in them is determined by permission levels. You can check permission level for particular user or group by Check permission Button on List Permission Settings page.
You should also know that there are some users that can access lists and items without explicit permission grant in list's permission list. Farm admins, Site Collection admins or users have granted access at Web application level in Central administration.

How to hide the "Data Dictionary" from the Alfresco Repository?

I am new to alfresco. I am integrating Alfresco with the web application as an library for my application. I am logging to alfresco as a admin and I can see the Data Dictionary in my repository. I want to hide it. Is it possible?
In order to hide the Data Dictionary folder for normal users you have to properly configure permissions. By default, all folders in Alfresco use the default ACL, which makes everyone Consumer (i.e. read only). This is what makes them visible to every user.
Try one the following:
[From Alfresco Explorer]
log in as admin
go to Data Dictionary
click on More Actions -> Manage space users
remove the only one entry you have there
[From Alfresco Share]
log in as admin
go to Repository
if needed, click on "Show folders"
hover on Data Dictionary
click on More -> Manage Permissions
hover on the Actions column, click Delete
This way you hide the Data Dictionary folder to normal users. Admin users always get access to everything. With similar procedures you can configure more fine grained access levels on folders, e.g. to enable some users to access them.

Plone 4.0.5 workflow and permission

I would be happy to get some advice on "workflow" type. Im not sure what is best - "Intranet/Extranet", "Simple Publication" or a third choice. Below are the types of folders and roles Im looking for:
public folders: anonymous has "r".
intranet folders: users has "r". Special users has "rw".
private folders: only user in question and admin has "rw" (special users has also "rw")
special folder: users that are member of a group has "rw".
Lastly, I do not understand this, users with e.g. "read", "edit" or "contribute" role can see user folders (marked as private), but also a test folder created as admin (marked as private)? PS Im using "Intranet/Extranet" type.
Thanks.
Nikolaj G.
You're confusing Roles and Permissions in your question. "read" and "write" would be permissions. Reader, Editor, Contributor are Roles.
In an Internet/Extranet workflow, Anonymous users (a Role) would get Read access to Public content.
Private content would be accessible to users with the Owner or Manager (Administrator) role
"Internally Published" content is readable by users with Contributor, Editor, Manager, Member, Owner and Reader roles, but only editable by Managers.
"Internal" would correspond to the "Intranet" setting you want - where most users get read access, but you can give users the "Editor" role (using the sharing tab) to allow them to modify content.
Your "special" folders would simply be in the "Internal" state, but you would grant the Editor role to a group rather than a user.
Your last paragraph doesn't make much sense. What do you mean by "created as admin"? Created by admin?
In the Internet/Extranet workflow, the only difference between Private and Internal states is that "Members" can not view private content - but Editors can modify it and Contributors can view it.
Go to /portal_workflow/intranet_workflow/states/manage_main in your site to see the various Role-to-permission mappings