Hi,
I checked with listSharedNotebooks and the ShareNotebookPrivilegeLevel for each SharedNotebook. But the GROUP PrivilegeLevel (3) seems a bit confusing. Where can I have the PrivilegeLevel of this GROUP ?
Do I really need to do all this API calls just to know if I have the User have the PrivilegeLevel to call the shareNote method ?
8 replies to this topic
#1
Posted 22 January 2013 - 09:19 AM
#2
Posted 22 January 2013 - 11:46 PM
#3
Posted 23 January 2013 - 02:23 PM
Yes I know it. But how to know if the user owns the note ? As I said "I checked with listSharedNotebooks and the ShareNotebookPrivilegeLevel for each SharedNotebook. But the GROUP PrivilegeLevel (3) seems a bit confusing. Where can I have the PrivilegeLevel of this GROUP ?".
#4
Posted 23 January 2013 - 06:39 PM
All the notes in the user's account are editable by the owner. It gets more tricky with notebooks that are shared by other users (learn more about sharing here). The list of all other users' notebooks are defined by linked notebooks. A reference of that sharing is stored in the owner's account as a SharedNotebook that contains the permissions given to other users. Here is a portion of code to help you understand how to get the sharednotebook and access the permissions:
$linkedNotebook = current($linkedNotebooks);
$parts = parse_url($linkedNotebook->noteStoreUrl);
if (!isset($parts['port'])) {
if ($parts['scheme'] === 'https') {
$parts['port'] = 443;
} else {
$parts['port'] = 80;
}
}
$sharedNoteStoreHttpClient =
new THttpClient($parts['host'], $parts['port'], $parts['path'], $parts['scheme']);
$sharedNoteStoreProtocol = new TBinaryProtocol($sharedNoteStoreHttpClient);
$sharedNoteStore = new NoteStoreClient($sharedNoteStoreProtocol, $sharedNoteStoreProtocol);
$sharedAuthResult =
$sharedNoteStore->authenticateToSharedNotebook($linkedNotebook->shareKey, $authToken);
$sharedAuthToken = $sharedAuthResult->authenticationToken;
$sharedNotebook = $sharedNoteStore->getSharedNotebookByAuth($sharedAuthToken);
// permissions are stored in $sharedNotebook-> notebookModifiable
#5
Posted 23 January 2013 - 07:00 PM
Ok, NotebookModifiable is flagged as deprecated. But we can still use it ? It's fully compatible with Evernote Business Notebooks ?
#6
Posted 23 January 2013 - 07:02 PM
You are correct, we updated that recently. Use sharedNotebook.SharedNotebookPrivilegeLevel instead.
#7
Posted 23 January 2013 - 07:11 PM
Ok but if the user belongs to the PrivilegeLevel 3 (GROUP Privilege), how can we see the Privilege of this particular Group ?
#8
Posted 24 January 2013 - 02:00 AM
The PrivilegeLevel GROUP is only used in a business context when sharing with the entire company. It is designed to propagate sharing configuration changes for notebooks that are in the Business library. The associated privilege level for those notebook are inherited from the Notebook.businessNotebook field.
Here is an example: if I share a notebook in read only mode with all the users in my business (sharedNotebook.SharedNotebookPrivilegeLevel = 3 and Notebook.businessNotebook = 1) and later decide to make it editable (sharedNotebook.SharedNotebookPrivilegeLevel = 3 and Notebook.businessNotebook = 5) all the users that have the previous permissions get full access as well.
Here is an example: if I share a notebook in read only mode with all the users in my business (sharedNotebook.SharedNotebookPrivilegeLevel = 3 and Notebook.businessNotebook = 1) and later decide to make it editable (sharedNotebook.SharedNotebookPrivilegeLevel = 3 and Notebook.businessNotebook = 5) all the users that have the previous permissions get full access as well.
#9
Posted 24 January 2013 - 08:30 AM
Thanks a lot ! I will try to applicate it now.
Also tagged with one or more of these keywords: business, rights
Learn & Share →
Evernote for Developers →
How do webhooks work with Evernote Business?Started by realistdreamer, 13 May 2013 |
|
|
||
Learn & Share →
Evernote for Developers →
Working with Evernote Business Users' Notes in Business NotebooksStarted by realistdreamer, 10 May 2013 |
|
|
||
Evernote Products →
Evernote Business →
Issue with evernote:// links in Business notebooks (EB Ticket #12008)Started by andreb, 29 Apr 2013 |
|
|
||
General Discussions →
Evernote General Discussion →
Which do I need Premium or Business?Started by Pginrstar, 22 Apr 2013 |
|
|
||
Evernote Products →
Evernote Business →
Add user name to billing records?Started by EdH, 15 Apr 2013 |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












