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) #26196

Merged
merged 4 commits into from Apr 29, 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).

(cherry picked from commit 926c888)
(cherry picked from commit ae4eb87)

# Conflicts:
#	frappe/integrations/doctype/oauth_client/oauth_client.json
#	frappe/patches.txt
@mergify mergify bot requested a review from a team as a code owner April 29, 2024 09:20
@mergify mergify bot added the conflicts label Apr 29, 2024
@mergify mergify bot requested review from akhilnarang and removed request for a team April 29, 2024 09:20
@mergify mergify bot assigned ankush Apr 29, 2024
Copy link
Contributor Author

mergify bot commented Apr 29, 2024

Cherry-pick of ae4eb87 has failed:

On branch mergify/bp/version-15-hotfix/pr-26193
Your branch is ahead of 'origin/version-15-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
	modified:   frappe/integrations/doctype/oauth_client/oauth_client.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/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

@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Apr 29, 2024
@ankush ankush removed the add-test-cases Add test case to validate fix or enhancement label Apr 29, 2024
@ankush ankush enabled auto-merge (squash) April 29, 2024 09:38
@ankush ankush merged commit c8387f8 into version-15-hotfix Apr 29, 2024
18 checks passed
@ankush ankush deleted the mergify/bp/version-15-hotfix/pr-26193 branch April 29, 2024 10:54
frappe-pr-bot pushed a commit that referenced this pull request Apr 30, 2024
# [15.25.0](v15.24.1...v15.25.0) (2024-04-30)

### Bug Fixes

* add missing impl for is_column_missing ([#26225](#26225)) ([#26227](#26227)) ([9490869](9490869))
* **ar:** render fullcalendar in english ([#26207](#26207)) ([#26210](#26210)) ([2f171cd](2f171cd))
* avoid perm error on dashboard chart ([#26150](#26150)) ([#26153](#26153)) ([0909589](0909589))
* **backup:** delete failed backup even if something fails during the backup process ([7c8c41c](7c8c41c))
* calendar in Arabic (backport [#26213](#26213)) ([#26216](#26216)) ([df6291b](df6291b)), closes [#26207](#26207)
* clean up print ([#26170](#26170)) ([#26176](#26176)) ([a41e496](a41e496))
* Dirty form when grid rows are moved ([#26230](#26230)) ([#26234](#26234)) ([c60f25d](c60f25d))
* frappe.template.compile(...) is not a function ([#26125](#26125)) ([#26127](#26127)) ([69e503c](69e503c))
* handle case where mimetype is None ([#26131](#26131)) ([#26133](#26133)) ([0c518a2](0c518a2))
* handle null in CSV preview ([551503a](551503a))
* hide tab button on child table ([#26148](#26148)) ([#26149](#26149)) ([fd42cbf](fd42cbf))
* multistep webform page navigation ([9415f4f](9415f4f))
* perm query for dashboard ([#26239](#26239)) ([#26243](#26243)) ([9ffb8af](9ffb8af))
* Renaming when doctype is used as a virtual link docfield fails ([#26025](#26025)) ([#26119](#26119)) ([724f944](724f944))
* **report builder:** responsive footer ([#26222](#26222)) ([#26224](#26224)) ([f19bff7](f19bff7))
* **report_utils:** ensure that delimiter and separator can't be empty ([#26202](#26202)) ([a1f008c](a1f008c))
* restoring site breaks when checking backup version ([#26186](#26186)) ([f2f167d](f2f167d))
* retry count per doc instead of global ([#26159](#26159)) ([#26161](#26161)) ([256578a](256578a))
* use document language for workflow action ([#26138](#26138)) ([#26139](#26139)) ([876d230](876d230))
* **UX:** warning when printing unsaved documents ([#26229](#26229)) ([#26232](#26232)) ([8826690](8826690))
* web form filtering ([#26122](#26122)) ([0c38f94](0c38f94))

### Features

* Allow usage of `print()` within `safe_exec()` ([#23084](#23084)) ([3ce15f3](3ce15f3))
* Allow user to optimize tables ([#26109](#26109)) ([#26121](#26121)) ([ca7148e](ca7148e))
* Document.remove_tag ([#22970](#22970)) ([#26178](#26178)) ([17ca7f4](17ca7f4))
* limit oauth client to roles (backport [#26193](#26193)) ([#26196](#26196)) ([c8387f8](c8387f8))

### Performance Improvements

* use base32 space for random names instead of base16 (backport [#25497](#25497)) ([#25546](#25546)) ([0723853](0723853))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 15.25.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 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants