From 9ef897d7a1e05bb7aa4fc70a8a43f500de3ba9e5 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Mon, 30 Aug 2021 17:22:06 +0200 Subject: [PATCH] fix spelling in comment --- api/auth.go | 2 +- helper/share.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/auth.go b/api/auth.go index 495b190..c2dcfae 100644 --- a/api/auth.go +++ b/api/auth.go @@ -158,7 +158,7 @@ func (c *Client) Login(ctx context.Context) error { return fmt.Errorf("Decrypted PublicKey Validation Message does not Match Original (you might be getting Hacked): %w", err) } - // Insert PublicKey into Client after checking it to Prevent ignored errors leading to proceding with a potentially Malicious PublicKey + // Insert PublicKey into Client after checking it to Prevent ignored errors leading to proceeding with a potentially Malicious PublicKey c.userPublicKey = user.GPGKey.ArmoredKey c.userID = user.ID diff --git a/helper/share.go b/helper/share.go index 68dd153..d8430df 100644 --- a/helper/share.go +++ b/helper/share.go @@ -99,7 +99,7 @@ func ShareResource(ctx context.Context, c *api.Client, resourceID string, change // ShareFolderWithUsersAndGroups Shares a Folder With The Users and Groups with the Specified Type, // if the Folder has already been shared With the User/Group the Permission Type will be Adjusted/Deleted. -// Note: Resources Permissions in the Folder are not Adjusted (Like the Extention does) +// Note: Resources Permissions in the Folder are not Adjusted (Like the Extension does) func ShareFolderWithUsersAndGroups(ctx context.Context, c *api.Client, folderID string, Users []string, Groups []string, permissionType int) error { changes := []ShareOperation{} for _, userID := range Users { @@ -159,14 +159,14 @@ func GeneratePermissionChanges(oldPermissions []api.Permission, changes []ShareO permissionChanges := []api.Permission{} for _, change := range changes { - // Find Permission thats invloves the Same ARO as Requested in the change + // Find Permission thats involves the Same ARO as Requested in the change var oldPermission *api.Permission for _, oldPerm := range oldPermissions { if oldPerm.ARO == change.ARO && oldPerm.AROForeignKey == change.AROID { oldPermission = &oldPerm } } - // Check Wheter Matching Permission Already Exists and needs to be adjusted or is a new one can be created + // Check Whether Matching Permission Already Exists and needs to be adjusted or is a new one can be created if oldPermission == nil { if change.Type == 15 || change.Type == 7 || change.Type == 1 { permissionChanges = append(permissionChanges, api.Permission{