mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
fixed #768: Check and refresh authentication in GoogleDrive.SetPermissions
This commit is contained in:
parent
606b9b2c3f
commit
5dba6f96c6
3 changed files with 6 additions and 4 deletions
|
@ -3,8 +3,8 @@
|
|||
|
||||
[Setup]
|
||||
AppName={#AppName}
|
||||
AppVersion={#AppVersion}
|
||||
AppVerName={#AppName} {#AppVersion}
|
||||
AppVersion={#AppVersion}
|
||||
Compression=lzma2/ultra64
|
||||
DefaultDirName={pf}\{#AppName}
|
||||
DefaultGroupName={#AppName}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define MyAppId "82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC"
|
||||
|
||||
[Setup]
|
||||
AppCopyright=Copyright © 2007-2015 {#MyAppPublisher}
|
||||
AppCopyright=Copyright (C) 2007-2015 {#MyAppPublisher}
|
||||
AppId={#MyAppId}
|
||||
AppMutex={#MyAppId}
|
||||
AppName={#MyAppName}
|
||||
|
@ -40,10 +40,10 @@ UninstallDisplayName={#MyAppName}
|
|||
VersionInfoCompany={#MyAppPublisher}
|
||||
VersionInfoTextVersion={#MyAppVersion}
|
||||
VersionInfoVersion={#MyAppVersion}
|
||||
WizardImageFile=WizardImageFile.bmp
|
||||
WizardSmallImageFile=WizardSmallImageFile.bmp
|
||||
WizardImageBackColor=clWhite
|
||||
WizardImageFile=WizardImageFile.bmp
|
||||
WizardImageStretch=no
|
||||
WizardSmallImageFile=WizardSmallImageFile.bmp
|
||||
|
||||
[Languages]
|
||||
Name: "en"; MessagesFile: "compiler:Default.isl"
|
||||
|
|
|
@ -166,6 +166,8 @@ private string GetMetadata(string title, string parentID)
|
|||
|
||||
private void SetPermissions(string fileID, GoogleDrivePermissionRole role, GoogleDrivePermissionType type, string value, bool withLink)
|
||||
{
|
||||
if (!CheckAuthorization()) return null;
|
||||
|
||||
string url = string.Format("https://www.googleapis.com/drive/v2/files/{0}/permissions", fileID);
|
||||
|
||||
string json = JsonConvert.SerializeObject(new
|
||||
|
|
Loading…
Reference in a new issue