The-WebOps-Club / fest-api

An API implementation for Saarang Shaastra like fests, including ERP and Mainsite and Mobile interface
12 stars 11 forks source link

Docs integration into ERP #28

Closed AbdealiLoKo closed 10 years ago

AbdealiLoKo commented 10 years ago

Trying to use Google drive in ERP for basic file management.

shahidhk commented 10 years ago

Basic integration is done.

Regarding sharing, what is best? Make doc public, and "Accessible to anyone having url" or share individually?

Both are possible in the API

paranoidsp commented 10 years ago

Make it accessible to everyone with the URL, and use your own methods to control URL access. That way you can have secret docs when required. On Apr 14, 2014 1:03 PM, "Shahidh K Muhammed" notifications@github.com wrote:

Basic integration is done.

Regarding sharing, what is best? Make doc public, and "Accessible to anyone having url" or share individually?

Both are possible in the API

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339742 .

shahidhk commented 10 years ago

Control URL access? you mean showing URL only, right? or masking the URL with some other encoding?

On Mon, Apr 14, 2014 at 1:06 PM, Karthikeya Viswanath < notifications@github.com> wrote:

Make it accessible to everyone with the URL, and use your own methods to control URL access. That way you can have secret docs when required. On Apr 14, 2014 1:03 PM, "Shahidh K Muhammed" notifications@github.com wrote:

Basic integration is done.

Regarding sharing, what is best? Make doc public, and "Accessible to anyone having url" or share individually?

Both are possible in the API

Reply to this email directly or view it on GitHub< https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339742

.

— Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339937 .

Shahidh K Muhammed Undergraduate Student Department of Engineering Design Indian Institute of Technology Madras Chennai 600036 Mobile: (+91) 9496362472 http://shahidhkmuhammed.in

paranoidsp commented 10 years ago

Either works, but I'd prefer masking the URL so that only the admin of that particular doc controls the sharing. On Apr 14, 2014 1:08 PM, "Shahidh K Muhammed" notifications@github.com wrote:

Control URL access? you mean showing URL only, right? or masking the URL with some other encoding?

On Mon, Apr 14, 2014 at 1:06 PM, Karthikeya Viswanath < notifications@github.com> wrote:

Make it accessible to everyone with the URL, and use your own methods to control URL access. That way you can have secret docs when required. On Apr 14, 2014 1:03 PM, "Shahidh K Muhammed" notifications@github.com

wrote:

Basic integration is done.

Regarding sharing, what is best? Make doc public, and "Accessible to anyone having url" or share individually?

Both are possible in the API

Reply to this email directly or view it on GitHub<

https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339742

.

Reply to this email directly or view it on GitHub< https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339937>

.

Shahidh K Muhammed Undergraduate Student Department of Engineering Design Indian Institute of Technology Madras Chennai 600036 Mobile: (+91) 9496362472 http://shahidhkmuhammed.in

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40340065 .

AbdealiLoKo commented 10 years ago

Two questions and an idea :

  1. In your UI, does the "Share" button come from google also ? If so, people will get confused.
  2. Were you able to do the api version where you can only access by oauth ?

Idea : Can you change a google doc's permissions using the API ? If so, then essentially, Doc sharing is easy and can be done via gmail emails but the sharing will be done through a good interface on ERP (like, you login via gmail to get into ERP level .. .as youre already logged in with gmail, you can continue with viewing as long as ur logged in)

On Mon, Apr 14, 2014 at 1:11 PM, Karthikeya Viswanath < notifications@github.com> wrote:

Either works, but I'd prefer masking the URL so that only the admin of that particular doc controls the sharing. On Apr 14, 2014 1:08 PM, "Shahidh K Muhammed" notifications@github.com

wrote:

Control URL access? you mean showing URL only, right? or masking the URL with some other encoding?

On Mon, Apr 14, 2014 at 1:06 PM, Karthikeya Viswanath < notifications@github.com> wrote:

Make it accessible to everyone with the URL, and use your own methods to control URL access. That way you can have secret docs when required. On Apr 14, 2014 1:03 PM, "Shahidh K Muhammed" < notifications@github.com>

wrote:

Basic integration is done.

Regarding sharing, what is best? Make doc public, and "Accessible to anyone having url" or share individually?

Both are possible in the API

Reply to this email directly or view it on GitHub<

https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339742

.

Reply to this email directly or view it on GitHub<

https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339937

.

Shahidh K Muhammed Undergraduate Student Department of Engineering Design Indian Institute of Technology Madras Chennai 600036 Mobile: (+91) 9496362472 http://shahidhkmuhammed.in

Reply to this email directly or view it on GitHub< https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40340065

.

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40340274 .

paranoidsp commented 10 years ago

Something along those lines is better. On Apr 14, 2014 1:23 PM, "AbdealiJK" notifications@github.com wrote:

Two questions and an idea :

  1. In your UI, does the "Share" button come from google also ? If so, people will get confused.
  2. Were you able to do the api version where you can only access by oauth ?

Idea : Can you change a google doc's permissions using the API ? If so, then essentially, Doc sharing is easy and can be done via gmail emails but the sharing will be done through a good interface on ERP (like, you login via gmail to get into ERP level .. .as youre already logged in with gmail, you can continue with viewing as long as ur logged in)

On Mon, Apr 14, 2014 at 1:11 PM, Karthikeya Viswanath < notifications@github.com> wrote:

Either works, but I'd prefer masking the URL so that only the admin of that particular doc controls the sharing. On Apr 14, 2014 1:08 PM, "Shahidh K Muhammed" notifications@github.com

wrote:

Control URL access? you mean showing URL only, right? or masking the URL with some other encoding?

On Mon, Apr 14, 2014 at 1:06 PM, Karthikeya Viswanath < notifications@github.com> wrote:

Make it accessible to everyone with the URL, and use your own methods to control URL access. That way you can have secret docs when required. On Apr 14, 2014 1:03 PM, "Shahidh K Muhammed" < notifications@github.com>

wrote:

Basic integration is done.

Regarding sharing, what is best? Make doc public, and "Accessible to anyone having url" or share individually?

Both are possible in the API

Reply to this email directly or view it on GitHub<

https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339742

.

Reply to this email directly or view it on GitHub<

https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40339937

.

Shahidh K Muhammed Undergraduate Student Department of Engineering Design Indian Institute of Technology Madras Chennai 600036 Mobile: (+91) 9496362472 http://shahidhkmuhammed.in

Reply to this email directly or view it on GitHub<

https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40340065

.

Reply to this email directly or view it on GitHub< https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40340274

.

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40341101 .

shahidhk commented 10 years ago

The sharing should be done individually to email.

1.Share button wont come.

  1. What I am doing is that, all document will be created by the FEST-API in its own Drive. Then sharing can be done with whoever's email, programmatically, and link can be displayed. Now, when the other user, open the document, he can edit on his behalf only, not on festapi's.

In this way, ownership will be with fest api, but we can give whatever access to whoever required.

AbdealiLoKo commented 10 years ago

Peace and cool :)

On Mon, Apr 14, 2014 at 1:50 PM, Shahidh K Muhammed < notifications@github.com> wrote:

The sharing should be done individually to email.

1.Share button wont come.

  1. What I am doing is that, all document will be created by the FEST-API in its own Drive. Then sharing can be done with whoever's email, programmatically, and link can be displayed. Now, when the other user, open the document, he can edit on his behalf only, not on festapi's.

In this way, ownership will be with fest api, but we can give whatever access to whoever required.

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40342850 .

shahidhk commented 10 years ago

For browsing files, embedding the iframe is enough. But, in order to upload a file to a specific location? We need to know our current directory position, which i frame wont give. Will it? Also, it wont give a browser functionality. It will just open the files/folder in a new window

So, I found out two alternatives: A js library: http://arkadiyk.github.com/ember-google-drive-browser/

and another API called PICKER https://developers.google.com/picker/

https://docs.google.com/picker?view=(%27folders%27,+null,+%7B%27selectFolder%27:+true%7D)

Which one will be better?

I think the both will require equal amount of effort put in to make it work

AbdealiLoKo commented 10 years ago

Agree ... Can you start working on it ?

I'll continue as soon as I finish working on the things im doing atm

On Mon, Apr 14, 2014 at 3:30 PM, Shahidh K Muhammed < notifications@github.com> wrote:

For browsing files, embedding the iframe is enough. But, in order to upload a file to a specific location? We need to know our current directory position, which i frame wont give. Will it? Also, it wont give a browser functionality. It will just open the files/folder in a new window

So, I found out two alternatives: A js library: http://arkadiyk.github.com/ember-google-drive-browser/

and another API called PICKER https://developers.google.com/picker/

https://docs.google.com/picker?view=(%27folders%27,+null,+%7B%27selectFolder%27:+true%7D)

Which one will be better?

I think the both will require equal amount of effort put in to make it work

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40350016 .

paranoidsp commented 10 years ago

Picker is the standard way of doing this. On Apr 14, 2014 3:36 PM, "AbdealiJK" notifications@github.com wrote:

Agree ... Can you start working on it ?

I'll continue as soon as I finish working on the things im doing atm

On Mon, Apr 14, 2014 at 3:30 PM, Shahidh K Muhammed < notifications@github.com> wrote:

For browsing files, embedding the iframe is enough. But, in order to upload a file to a specific location? We need to know our current directory position, which i frame wont give. Will it? Also, it wont give a browser functionality. It will just open the files/folder in a new window

So, I found out two alternatives: A js library: http://arkadiyk.github.com/ember-google-drive-browser/

and another API called PICKER https://developers.google.com/picker/

https://docs.google.com/picker?view=(%27folders%27,+null,+%7B%27selectFolder%27:+true%7D)

Which one will be better?

I think the both will require equal amount of effort put in to make it work

Reply to this email directly or view it on GitHub< https://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40350016

.

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40350443 .

shahidhk commented 10 years ago

I will start working on Picker then. Anyway, both are js only

shahidhk commented 10 years ago

The migrations is docs have cupped, and I mistakenly pushed them. Can u reset the migration? Also, check the management command, It snot completely done.

AbdealiLoKo commented 10 years ago

It says there are no migrations available for docs ... Should I make them ?

On Wed, Apr 16, 2014 at 7:05 AM, Shahidh K Muhammed < notifications@github.com> wrote:

The migrations is docs have cupped, and I mistakenly pushed them. Can u reset the migration? Also, check the management command, It snot completely done.

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/28#issuecomment-40554416 .

shahidhk commented 10 years ago

Ya. I have a few more changes in mind.

  1. Change the ForeignKey in model, its useless.
  2. Instead of storing in db, save as string in settings.py. Tell me when you are working. I can complete this by 5pm only.
shahidhk commented 10 years ago

This is what I was trying to do

There are some redundant links and views which I wrote for testing out, not yet removed.

Will work on this today evening. @AbdealiJK Let me know if you are making any changes

AbdealiLoKo commented 10 years ago
Phoenix25 commented 10 years ago

aside from permission handling... the remaining have been implemented except for

AbdealiLoKo commented 10 years ago

This doesn't look very nice :D

@Phoenix25 : Can we sit sometime today for about an hour so you can quickly explain the code to me ? And I'll fix the frontend tonight ? (As you said, the mixture of bs 1 and 2 is confusing, so ill do it ... itll be easier for you)

shahidhk commented 10 years ago

@mhtkmr54 Create a field called drive_folders in ERPProfile and save all the related folders into it as a parsable string (see json.dumps and json.loads).

Use a function to populate this field, which will be called whenever some change happens

AbdealiLoKo commented 10 years ago

As this idea is packed - closing it.