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

feat: limit oauth client to roles (backport #26193) #26195

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 29, 2024

You can now set roles which should be allowed to use a specific OAuth Client.

This is useful to limit usage to certain group of users. E.g. Only developers should be able to use OAuth to login to GitHub.


This is an automatic backport of pull request #26193 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team April 29, 2024 09:19
@mergify mergify bot added the conflicts label Apr 29, 2024
@mergify mergify bot requested review from ankush and removed request for a team April 29, 2024 09:19
@mergify mergify bot assigned ankush Apr 29, 2024
Copy link
Contributor Author

mergify bot commented Apr 29, 2024

Cherry-pick of 926c888 has failed:

On branch mergify/bp/version-14-hotfix/pr-26193
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit 926c888374.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   frappe/desk/reportview.py

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of ae4eb87 has failed:

On branch mergify/bp/version-14-hotfix/pr-26193
Your branch is ahead of 'origin/version-14-hotfix' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit ae4eb87458.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   frappe/core/doctype/user/user.js
	modified:   frappe/core/doctype/user/user.py
	new file:   frappe/integrations/doctype/oauth_client/patches/__init__.py
	new file:   frappe/integrations/doctype/oauth_client/patches/set_default_allowed_role_in_oauth_client.py
	new file:   frappe/integrations/doctype/oauth_client_role/__init__.py
	new file:   frappe/integrations/doctype/oauth_client_role/oauth_client_role.json
	new file:   frappe/integrations/doctype/oauth_client_role/oauth_client_role.py
	modified:   frappe/oauth.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   frappe/integrations/doctype/oauth_client/oauth_client.json
	both modified:   frappe/integrations/doctype/oauth_client/oauth_client.py
	both modified:   frappe/patches.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

(cherry picked from commit ae4eb87)

# Conflicts:
#	frappe/integrations/doctype/oauth_client/oauth_client.json
#	frappe/integrations/doctype/oauth_client/oauth_client.py
#	frappe/patches.txt
@ankush ankush force-pushed the mergify/bp/version-14-hotfix/pr-26193 branch from 93f4868 to a466576 Compare April 29, 2024 09:41
@ankush ankush enabled auto-merge (squash) April 30, 2024 06:49
@ankush ankush added Skip CI Doesn't run Ci for this PR. Run Server Tests Runs Server CI builds even if backend changes not detected. and removed conflicts labels Apr 30, 2024
@ankush ankush merged commit 5b7bccf into version-14-hotfix Apr 30, 2024
9 of 11 checks passed
@ankush ankush deleted the mergify/bp/version-14-hotfix/pr-26193 branch April 30, 2024 07:05
frappe-pr-bot pushed a commit that referenced this pull request Apr 30, 2024
# [14.73.0](v14.72.0...v14.73.0) (2024-04-30)

### Bug Fixes

* 🐛 don't create __init__.py files when gathering pages ([#26045](#26045)) ([#26090](#26090)) ([84fbc40](84fbc40)), closes [#25167](#25167)
* add missing impl for is_column_missing (backport [#26225](#26225)) ([#26226](#26226)) ([b5abe55](b5abe55))
* allow setting dynamic filters for number cards even without developer mode ([7d5b443](7d5b443))
* avoid perm error on dashboard chart ([#26150](#26150)) ([#26156](#26156)) ([6231e1d](6231e1d))
* calendar in Arabic (backport [#26213](#26213)) ([#26215](#26215)) ([67530e3](67530e3)), closes [#26207](#26207)
* compute modal title server side ([#26191](#26191)) ([760ff72](760ff72))
* Dirty form when grid rows are moved ([#26230](#26230)) ([#26233](#26233)) ([ce4fa2a](ce4fa2a))
* filter select perm in get_doctypes_with_read (backport [#26037](#26037)) ([#26039](#26039)) ([e889691](e889691))
* frappe.template.compile(...) is not a function ([#26125](#26125)) ([#26126](#26126)) ([ea5d7b7](ea5d7b7))
* german translations ([#26219](#26219)) ([a40dfdd](a40dfdd))
* **grid_row:** check child table dependent properties whenever a row is selected ([caabb79](caabb79))
* **grid:** ensure that `doc` itself is not null ([a2b61eb](a2b61eb)), closes [#25800](#25800)
* handle case where mimetype is None ([#26131](#26131)) ([#26132](#26132)) ([cc3b654](cc3b654))
* handle null in CSV preview ([#26154](#26154)) ([2e2649b](2e2649b))
* register faulthandler on true stderr only (backport [#26028](#26028)) ([#26033](#26033)) ([45630fe](45630fe))
* rename fields for html, col, section, etc. ([#26188](#26188)) ([1a2411c](1a2411c))
* Renaming when doctype is used as a virtual link docfield fails ([#26025](#26025)) ([#26118](#26118)) ([eea6509](eea6509))
* **report builder:** responsive footer ([#26222](#26222)) ([#26223](#26223)) ([4f0bcf1](4f0bcf1))
* **report_utils:** ensure that delimiter and separator can't be empty ([5301516](5301516))
* **report_view:** allow exporting all rows even if count is disabled ([c0cf52f](c0cf52f))
* retry count per doc instead of global ([#26159](#26159)) ([#26160](#26160)) ([0d6ff95](0d6ff95))
* strip redirect URIs for trailing whitespaces ([#26006](#26006)) ([#26007](#26007)) ([aefc6f9](aefc6f9))
* unknown charset windows-874 problem on incoming mail ([86eff33](86eff33))
* **UX:** warning when printing unsaved documents ([#26229](#26229)) ([#26231](#26231)) ([1530618](1530618))
* web form filtering ([#26122](#26122)) ([#26123](#26123)) ([519fec5](519fec5))

### Features

* enable dynamic filters for standard number cards ([3a4eeb9](3a4eeb9))
* **grid:** Add shift-click for selecting multiple rows ([c9d227a](c9d227a))
* **grid:** Extend clickable area of checkboxes ([2664cf3](2664cf3))
* let users unlock stuck documents (backport [#24782](#24782)) ([#25225](#25225)) ([e58ea03](e58ea03))
* limit oauth client to roles (backport [#26193](#26193)) ([#26195](#26195)) ([5b7bccf](5b7bccf))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.73.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released Run Server Tests Runs Server CI builds even if backend changes not detected. Skip CI Doesn't run Ci for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants