iwestlin / gdshare

496 stars 264 forks source link

how to use 1 shared drive only ? #15

Closed masbodo closed 4 years ago

masbodo commented 4 years ago

i have many shared drive

how to use 1 shared drive only ?

iwestlin commented 4 years ago

...you can simply open https://your.domain.com/ls/your-team-drive-id

There will be a search box in the top-right corner of that page, and it will only search files in that team drive.

masbodo commented 4 years ago

...you can simply open https://your.domain.com/ls/your-team-drive-id

There will be a search box in the top-right corner of that page, and it will only search files in that team drive.

but user can access other shared drive or root with delete /ls/your-team-drive-id

any solutions ?

iwestlin commented 4 years ago

I just added the support of service account, you could open any of your .json file of service account, and copy all it's content here: https://github.com/iwestlin/gdshare/blob/a75c0bcb131ec3c84df65e967625c85a5bfe5b6c/template-sa.js#L8

Then all you need to do is to add the sa's client_email to the specific team drive's members.

iwestlin commented 4 years ago

// 用文本编辑器打开你的任意SA的json授权文件,将其中内容整体复制下来,替换掉 {}

means replace {} with all content in .json file of a service account.

masbodo commented 4 years ago

o the specific team drive's members.

how to add multiple email ?

"client_email": "example123@gmail.com", "client_id": "132423423423423423423", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/example123@gmail.com"

the client_x509_cert_url must added client_email too ?

iwestlin commented 4 years ago

just add example123@gmail.com to members of that team drive.

here is a tutorial: https://support.google.com/a/users/answer/9310249#1.2

masbodo commented 4 years ago

thanks