09-15-2020 08:30 PM
Wondering if anyone has some advice for me. We have a share action that allows users to quickly share internally, the action allows the selection of users and it verifies that they don't have access to login to the current document. If the user can authenticate, no action is taken, but if a user can't, the action gave them Read. We changed Read so that it only allowed system access but the user couldn't see any files. We needed to have a basic membership so that users could browse and be added to documents. Does anyone have any idea how to change this authentication:
try {
// check if the user has read access to the document
input = Auth.LoginAs(input, {'name': username});
input = Auth.Logout(input, {});
} catch(error) {
// if no access, grant read permission
if (currentUser.name === username) {
}
input = Auth.LoginAs(input, {});
input = Document.AddPermission(input, {
'acl': 'sharing',
'permission': 'ReadBrowse',
'username': username
});
input = Auth.Logout(input, {});
}
09-16-2020 05:15 PM
Hello,
If you need to be able to browse to the document, you need to retrieve all parents (until Root) and give READ access to them (if not already provided). Is it want you're looking for?
Regards
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.