I have liferay-ce-portal-7.1.3-ga4 and it is not working
Google Drive with Liferay repository
Extending Liferay document& media to support Google Drive as repository.
Steps for integration :
1) Generate Client Id and secret code from https://console.developers.google.com/project
and redirect URL must be preceding by /c/document_library/google_api_access?cmd=token
2) Use this authentication credential in Control Panel ->Portal Setting --> Authentication --> google
3) Go to Cignex-Datamatics (organization) --> Control Panel → Content → Document and Media -->Add Repository.
* Create a repository named "mydrive"
* Select Repository Type as "Google Repository"
** Inside Google-Drive, it will create a mydrive folder under "Cignex-Datamatics", name of the organization.
客户评分
平均 (5 票)
I'm having this error:
2019-02-08 10:44:44,881 ERROR [http-bio-8443-exec-21] com.liferay.portal.repository.google.drive.GoogleDriveRepository:1247 403 Forbidden_{_ "code" : 403,_ "errors" : [ {_ "domain" : "usageLimits",_ "message" : "User Rate Limit Exceeded. Rate of requests for user exceed configured project quota. You may consider re-evaluating expected per-user traffic to the API and adjust project quota limits accordingly.
I'm using Liferay Portal Enterprise Edition 6.2.10 EE GA1.
Any ideas? The people at Google told me apparently the error should be, in other words, in the design of this app. This app is very good only a few tweaks should be made.
Thanks
2019-02-08 10:44:44,881 ERROR [http-bio-8443-exec-21] com.liferay.portal.repository.google.drive.GoogleDriveRepository:1247 403 Forbidden_{_ "code" : 403,_ "errors" : [ {_ "domain" : "usageLimits",_ "message" : "User Rate Limit Exceeded. Rate of requests for user exceed configured project quota. You may consider re-evaluating expected per-user traffic to the API and adjust project quota limits accordingly.
I'm using Liferay Portal Enterprise Edition 6.2.10 EE GA1.
Any ideas? The people at Google told me apparently the error should be, in other words, in the design of this app. This app is very good only a few tweaks should be made.
Thanks
It is not working for me with Liferay 7. Do you have a solution for Liferay 7?
Thank you all for your valuable inputs. will surely work on your suggestion !
This portlet does work (tested with Liferay Portal CE v6.2.3 GA4). I see a lot of potential here, however it kind of depends on the use case you have to what extend this portlet is well suited. I had some issues getting it to work, but that was mainly my own fault: I forgot to explicitly press the 'Enable API' button for the GDrive API... this rendered in a very descriptive error message however (which helped me a lot ;) ):
08:05:23,511 ERROR [http-bio-0.0.0.0-8080-exec-31][GoogleDriveRepository:543] 403 Forbidden_{_ "code" : 403,_ "errors" : [ {_ "domain" : "usageLimits",_ "message" : "Access Not Configured. The API (Drive API) is not enabled for your project. Please use the Google Developers Console to update your configuration.....
I also had to restart the portal after installation of the portlet to make it work. Let me state below what else I have discovered about this portlet. Please note: those are just my personal findings, whether these are bad or good depends on the use case.
1. You can only connect using 1 GDrive API-key per portal (as Madhukara Patel already mentioned). This means that every user in every site of the portal that creates a 'Google repository' in the D&M library will be using the same Google account and all files of all of them will be stored in that same Google account.
2. When a Google repository is created in Liferay, it will create a subfolder in the Google account for the Liferay Site and inside that folder it will create a subfolder with the name of the repository. This way you can have multiple Google repositories per site and per portal.
3. Google repositories seemed to be scoped per site and therefore Liferay portal users will only be able to access content (e.g. files/folders) of that site stored in Google drive.
4. You cannot use an existing folder in Google Drive as 'Google repository', which means you will have to move existing files to that folder to show up in Liferay
5. You can remove the Google repositories and API keys from Liferay and the files will still be present in Google drive
Then for people that are not really familiar with the Google Drive API and OAuth a small step-by-step installation manual:
0. Go to https://console.developers.google.com/project (if you already have a project skip to step 2.)
1. Click the 'Create Project' button - you will end up in Google Developers Console
2. Click the 'APIs & auth' link in the menu on the left - you will be presented the 'API library'
3. Click the 'Credentials' link in the menu on the left
4. Cick the 'Create new Client ID' button - you will be presented a popup screen to choose 'Application type'
5. Select 'Web application' and press 'Configure consent screen' - you will be presented configuration screen for consent screen
6. Set your email address and fill in a 'Product name'
7. Press the 'Save' button - you will be presented a similar popup screen as before however now you can fill in 'Authorized Javascript origins' and 'Authorized redirects URIs'
8. Fill out the name of your portal (e.g. https://my.portal.com) at field 'Authorized Javascript origins'
9. Fill out the name of your portal padded with the string '/c/document_library/google_api_access?cmd=token' at field 'Authorized redirects URIs' (e.g. https://my.portal.com/c/document_library/google_api_access?cmd=token)
10. Press the 'Create Client ID' button - you will now see a 'Client ID web application' section right next to the OAuth section on your screen, you will need to remember:
a) Client ID
b) Client secret
11. Click the 'APIs' link in the left menu - you will be presented the 'API library'
12. Click on the 'Drive API'
13. Click the 'Enable API' button
14. Now go to your Liferay Portal
15. Go to 'Control Panel' -> 'Portal Settings' -> 'Authentication'
16. Click the tab 'Google'
17. Fill in both 'Client ID' and 'Client secret' from step 10.
18. Click the 'get Access & Refresh Token' button - this will first give you a popup with URL and then a redirect to Google
19. In the popup select the emailaccount (e.g. GDrive account) you want to use to share files with
20. Give consent by clicking 'Accept' button to sharing your
a) Email address
b) Basic profile data
c) Management of your files in GDrive
21. Go to your 'Document and Media' library
22. Press the 'Add' button and select 'Repository'
23. Fill in a name and select 'Google Repository' as 'Repository Type'
24. Press the 'Save' button
25. Click on the link of your repository, Liferay should say something like: 'There are no documents or media files in this folder', if not restart your portal and try again (or inspect your log files)
26. Now add docs and folders as you like
08:05:23,511 ERROR [http-bio-0.0.0.0-8080-exec-31][GoogleDriveRepository:543] 403 Forbidden_{_ "code" : 403,_ "errors" : [ {_ "domain" : "usageLimits",_ "message" : "Access Not Configured. The API (Drive API) is not enabled for your project. Please use the Google Developers Console to update your configuration.....
I also had to restart the portal after installation of the portlet to make it work. Let me state below what else I have discovered about this portlet. Please note: those are just my personal findings, whether these are bad or good depends on the use case.
1. You can only connect using 1 GDrive API-key per portal (as Madhukara Patel already mentioned). This means that every user in every site of the portal that creates a 'Google repository' in the D&M library will be using the same Google account and all files of all of them will be stored in that same Google account.
2. When a Google repository is created in Liferay, it will create a subfolder in the Google account for the Liferay Site and inside that folder it will create a subfolder with the name of the repository. This way you can have multiple Google repositories per site and per portal.
3. Google repositories seemed to be scoped per site and therefore Liferay portal users will only be able to access content (e.g. files/folders) of that site stored in Google drive.
4. You cannot use an existing folder in Google Drive as 'Google repository', which means you will have to move existing files to that folder to show up in Liferay
5. You can remove the Google repositories and API keys from Liferay and the files will still be present in Google drive
Then for people that are not really familiar with the Google Drive API and OAuth a small step-by-step installation manual:
0. Go to https://console.developers.google.com/project (if you already have a project skip to step 2.)
1. Click the 'Create Project' button - you will end up in Google Developers Console
2. Click the 'APIs & auth' link in the menu on the left - you will be presented the 'API library'
3. Click the 'Credentials' link in the menu on the left
4. Cick the 'Create new Client ID' button - you will be presented a popup screen to choose 'Application type'
5. Select 'Web application' and press 'Configure consent screen' - you will be presented configuration screen for consent screen
6. Set your email address and fill in a 'Product name'
7. Press the 'Save' button - you will be presented a similar popup screen as before however now you can fill in 'Authorized Javascript origins' and 'Authorized redirects URIs'
8. Fill out the name of your portal (e.g. https://my.portal.com) at field 'Authorized Javascript origins'
9. Fill out the name of your portal padded with the string '/c/document_library/google_api_access?cmd=token' at field 'Authorized redirects URIs' (e.g. https://my.portal.com/c/document_library/google_api_access?cmd=token)
10. Press the 'Create Client ID' button - you will now see a 'Client ID web application' section right next to the OAuth section on your screen, you will need to remember:
a) Client ID
b) Client secret
11. Click the 'APIs' link in the left menu - you will be presented the 'API library'
12. Click on the 'Drive API'
13. Click the 'Enable API' button
14. Now go to your Liferay Portal
15. Go to 'Control Panel' -> 'Portal Settings' -> 'Authentication'
16. Click the tab 'Google'
17. Fill in both 'Client ID' and 'Client secret' from step 10.
18. Click the 'get Access & Refresh Token' button - this will first give you a popup with URL and then a redirect to Google
19. In the popup select the emailaccount (e.g. GDrive account) you want to use to share files with
20. Give consent by clicking 'Accept' button to sharing your
a) Email address
b) Basic profile data
c) Management of your files in GDrive
21. Go to your 'Document and Media' library
22. Press the 'Add' button and select 'Repository'
23. Fill in a name and select 'Google Repository' as 'Repository Type'
24. Press the 'Save' button
25. Click on the link of your repository, Liferay should say something like: 'There are no documents or media files in this folder', if not restart your portal and try again (or inspect your log files)
26. Now add docs and folders as you like
Hi,
This portal is very helpful to all who are try to connect with google drive with liferay.
I found one drawback in this hook. If we upload documents using different mail ids , all are storing in one google drive( which id we configure in portal setting) .
This portal is very helpful to all who are try to connect with google drive with liferay.
I found one drawback in this hook. If we upload documents using different mail ids , all are storing in one google drive( which id we configure in portal setting) .
查看此项的客户同时购买了
- Liferay Con...
- Liferay, Inc.
-
- 仅支持企业版
- Liferay Aud...
- Liferay, Inc.
-
- 仅支持企业版
- Liferay Fjo...
- Liferay, Inc.
-
- 免费
- Liferay CE ...
- Liferay, Inc.
-
- 免费