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
feat: allow wildcard for doctype in permission hooks #25729
Merged
akhilnarang
merged 6 commits into
frappe:develop
from
revant:feat-wildcard-permissions-hook
Apr 10, 2024
Merged
feat: allow wildcard for doctype in permission hooks #25729
akhilnarang
merged 6 commits into
frappe:develop
from
revant:feat-wildcard-permissions-hook
Apr 10, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
add-test-cases
Add test case to validate fix or enhancement
label
Mar 29, 2024
revant
added
backport version-14-hotfix
backport to version 14
backport version-15-hotfix
Backport the PR to v15
labels
Apr 1, 2024
akhilnarang
requested changes
Apr 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change, can fetch the list of hooks once instead of twice each time
akhilnarang
approved these changes
Apr 10, 2024
mergify bot
pushed a commit
that referenced
this pull request
Apr 10, 2024
* feat: allow wildcard for doctype in permission hooks * fix: pass doctype to permission query * fix: combine methods instead of alternate * test: wildcard has_permssion hook * test: wildcard has_permssion make note public * fix: fetch list of hooks once (cherry picked from commit 7e16e90)
mergify bot
pushed a commit
that referenced
this pull request
Apr 10, 2024
* feat: allow wildcard for doctype in permission hooks * fix: pass doctype to permission query * fix: combine methods instead of alternate * test: wildcard has_permssion hook * test: wildcard has_permssion make note public * fix: fetch list of hooks once (cherry picked from commit 7e16e90)
akhilnarang
pushed a commit
that referenced
this pull request
Apr 10, 2024
* feat: allow wildcard for doctype in permission hooks * fix: pass doctype to permission query * fix: combine methods instead of alternate * test: wildcard has_permssion hook * test: wildcard has_permssion make note public * fix: fetch list of hooks once (cherry picked from commit 7e16e90) Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
akhilnarang
pushed a commit
that referenced
this pull request
Apr 10, 2024
* feat: allow wildcard for doctype in permission hooks * fix: pass doctype to permission query * fix: combine methods instead of alternate * test: wildcard has_permssion hook * test: wildcard has_permssion make note public * fix: fetch list of hooks once (cherry picked from commit 7e16e90) Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Apr 16, 2024
# [14.72.0](v14.71.0...v14.72.0) (2024-04-16) ### Bug Fixes * handle empty style tag ([#25910](#25910)) ([#25915](#25915)) ([771fa80](771fa80)) * handle interface error during report timeout ([#25893](#25893)) ([#25894](#25894)) ([5d4e106](5d4e106)) * make letterhead attachments public by default (backport [#25925](#25925)) ([#25926](#25926)) ([6ea38b6](6ea38b6)) * make_error_msg for imap ([b2cfa49](b2cfa49)) ### Features * add option to set default email recipients ([#25555](#25555)) ([dc070a4](dc070a4)) * allow wildcard for doctype in permission hooks ([#25729](#25729)) ([#25891](#25891)) ([af33091](af33091)) * **Customize Form:** add "Trim Table" action (backport [#25923](#25923)) ([#25934](#25934)) ([ad34d52](ad34d52))
frappe-pr-bot
pushed a commit
that referenced
this pull request
Apr 16, 2024
# [15.23.0](v15.22.0...v15.23.0) (2024-04-16) ### Bug Fixes * filter button translation ([#25944](#25944)) ([2bea73a](2bea73a)) * frm can be missing ([9e227b0](9e227b0)) * handle empty style tag ([#25910](#25910)) ([#25916](#25916)) ([34fbf6d](34fbf6d)) * handle interface error during report timeout ([#25893](#25893)) ([#25895](#25895)) ([6784b5d](6784b5d)) * let's color tag in form view ([#25949](#25949)) ([#25954](#25954)) ([0e6820d](0e6820d)) * limit title length on form ([#25880](#25880)) ([fb24480](fb24480)) * log out reliability ([#25865](#25865)) ([72b4540](72b4540)) * make letterhead attachments public by default ([#25925](#25925)) ([#25927](#25927)) ([c5c3424](c5c3424)) * private workspace routing (backport [#25904](#25904)) ([#25921](#25921)) ([c4eeb2e](c4eeb2e)) * reset announcements after saving settings ([b4ee409](b4ee409)) * show warning for pending migrations ([#25908](#25908)) ([#25909](#25909)) ([026514e](026514e)), closes [#25880](#25880) * title width for form ([#25958](#25958)) ([#25959](#25959)) ([7a884e2](7a884e2)) * toolbar condition for setting up widget ([e42593e](e42593e)) * use boot to store announcement ([5f14e68](5f14e68)) * use localStorage for widget content ([642db78](642db78)) ### Features * add html for widget below navbar ([ea76002](ea76002)) * add option to filter email recipients ([c175911](c175911)) * add option to set default email recipients ([#25555](#25555)) ([bc496c1](bc496c1)) * allow wildcard for doctype in permission hooks ([#25729](#25729)) ([#25892](#25892)) ([7a4fa2f](7a4fa2f)) * announcement widget in navbar settings ([a947f44](a947f44)) * **APIv2:** Add comment via REST API ([#25889](#25889)) ([#25901](#25901)) ([2751be3](2751be3)) * **Customize Form:** add "Trim Table" action (backport [#25923](#25923)) ([#25933](#25933)) ([aa32595](aa32595)) * delete failed backups ([615cd71](615cd71)) * setup widget in toolbar ([e011cfa](e011cfa)) ### Reverts * Revert "test(UI): navbar announcements" ([3b23054](3b23054))
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature for
permission_query_conditions
andhas_permission
hooks to accept"*"
wildcard along with specific doctypes.Combining the list with
+=
operator. so we get the doctype hook as well as wildcard hooks combined.docs: https://frappeframework.com/app/wiki-page-patch/f9a1b577f3