Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Backend): use object over loose array for permissions #1173

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented Jun 27, 2024

Solves issues with undefined array keys, but is said to be more performant but also more clear when coding.

fixes #1131

@blizzz blizzz added bug Something isn't working 3. to review Waiting for reviews labels Jun 27, 2024
lib/Db/Table.php Outdated
@@ -101,10 +102,9 @@ public function jsonSerialize(): array {
}

/**
* @psalm-suppress MismatchingDocblockReturnType
* @return array{read: bool, create: bool, update: bool, delete: bool, manage: bool}|null
* @return ?Permissions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need as we have the type hint already.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and removed 2, 3 others of the same

Solves issues with undefined array keys, but is said to be more performent
but also more clear when coding.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz blizzz force-pushed the fix/1131/fix-undefined-key-for-good branch from 8079446 to 8086f01 Compare July 4, 2024 09:27
@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 4, 2024
@juliushaertl juliushaertl merged commit 741349d into main Jul 4, 2024
59 checks passed
@juliushaertl juliushaertl deleted the fix/1131/fix-undefined-key-for-good branch July 4, 2024 11:21
@blizzz
Copy link
Member Author

blizzz commented Jul 4, 2024

/backport to stable0.7

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Jul 4, 2024
Copy link

backportbot bot commented Jul 4, 2024

The backport to stable0.7 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable0.7
git pull origin stable0.7

# Create the new backport branch
git checkout -b backport/1173/stable0.7

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 8086f019

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1173/stable0.7

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@blizzz
Copy link
Member Author

blizzz commented Jul 22, 2024

/backport to stable0.7

Copy link

backportbot bot commented Jul 22, 2024

The backport to stable0.7 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable0.7
git pull origin stable0.7

# Create the new backport branch
git checkout -b backport/1173/stable0.7

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 8086f019

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1173/stable0.7

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@blizzz
Copy link
Member Author

blizzz commented Jul 22, 2024

ok, backport does not work without pulling down more things from main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Undefined array key "manageTable" at ViewService.php#419
2 participants