fix spelling in comment

This commit is contained in:
Samuel Lorch 2021-08-30 17:22:06 +02:00
parent d59d0cc0e5
commit 9ef897d7a1
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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{