Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccessControl path for GoogleDrive #2687

Closed
mit-ems opened this issue Sep 30, 2018 · 1 comment
Closed

AccessControl path for GoogleDrive #2687

mit-ems opened this issue Sep 30, 2018 · 1 comment
Assignees

Comments

@mit-ems
Copy link

mit-ems commented Sep 30, 2018

I'm transitioning from a Dropbox backend to a GoogleDrive backend, and having an issue. I previously used the "accessControl" function to set access permissions, which worked fine with Dropbox because the "path" and "relpath" arguments were the actual directory names. With GoogleDrive though, the "path" and "relpath" attributes are the GoogleDrive folder IDs, which makes it extremely difficult to effectively manage the permissions. Is there any way to have the "path" attribute show the folder name instead of the folder ID when using the GoogleDrive driver?

@nao-pon nao-pon added the feature label Oct 6, 2018
@nao-pon nao-pon self-assigned this Oct 6, 2018
@nao-pon
Copy link
Member

nao-pon commented Oct 6, 2018

@mit-ems The GooglrDrive driver holds folder information in the session. However, since you do not have access rights to the session object, you can not use it. So extend it to get the session object. Once this is possible, session data can be obtained as follows.

'accessControl' => function($name, $path, $accessControlData, $volume) {
    $session = $volume->getSession();
    $cacheData = $session->get($volume->id() . $volume->netMountKey);
}

nao-pon added a commit that referenced this issue Oct 6, 2018
@nao-pon nao-pon closed this as completed in cebd547 Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants