Commit graph

132 commits

Author SHA1 Message Date
ljain112
33ba43270c fix: correct permissions for user cannot create doctypes 2024-08-21 17:58:52 +05:30
Sumit Bhanushali
7e2da2be6c fix: precommit check 2024-07-13 11:39:16 +05:30
mahsem
2f55f2c788 fix: translation in permission_manager.js
fix: translation in permission_manager.js
2024-07-11 12:04:16 +00:00
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Shariq Ansari
d89cec362c fix: do not allow to set if_owner & report perm together 2024-01-29 16:46:42 +05:30
Jannat Patel
bdc495f5d1
fix: show right permission for user cannot create doctypes (#24027) 2023-12-29 11:54:03 +05:30
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Ankush Menat
0381f836d6 fix: update correct role permission rule
Right now if you have if-owner rule on doctype then whatever you change
will only apply to last inserted rule because we don't check if-owner
value

Long term better fix: Identify with perm rule name instead of arbitrary
"primary keys" defined in code.
2023-09-18 13:45:20 +05:30
Ankush Menat
b484c65283 fix: check if owner while deleting permission
If doctype has 2 rules: 1 with if-owner and one without then deleting one deletes both.
2023-09-18 12:33:26 +05:30
HENRY Florian
cf63690a3c
feat: use Link field for search in Role Permissions Manager (#22232)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-09-15 15:13:02 +05:30
Ankush Menat
1b406edd54 feat: Desk User role 2023-08-28 22:31:23 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
Ankush Menat
0e92fc9bf5 fix: Clear cache after role perm manager 2023-06-19 16:29:35 +05:30
Ankush Menat
8446875257
refactor!: Remove "Set user permission" permtype (#20090)
This has never worked and setting user permission requires system
manager role always (because of permissions on list view)
2023-02-20 16:07:49 +05:30
Ankush Menat
b55bbd0a8c
fix(UX): Sort case-insensitive where it makes sense (#20088) 2023-02-20 13:07:32 +05:30
Raffael Meyer
09d35c74eb
fix: remove redundant translation (#18775) 2022-11-06 17:27:02 +05:30
Ankush Menat
40f27f908a style: format JS files with prettier 2022-08-04 14:51:01 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Gavin D'souza
084a1e6c31 refactor: get_permissions
* Show page even if dangling Custom DocPerm records encountered
* Add typing hints
* Cleanup APIs
2022-06-27 15:18:06 +05:30
Suraj Shetty
5db7716df2
Merge pull request #17223 from frappe/rpm_typo 2022-06-16 16:20:27 +05:30
Michelle Alva
86f9465432
chore: typo 2022-06-16 16:16:00 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
smehata
6cbede451d
fix(Permission Manager): Update client-side permission data (#15945)
On updating access from Permission Manager. Permissions are not updated till we do a hard refresh.
![Screenshot from 2022-02-11 12-32-52](https://user-images.githubusercontent.com/53169014/153550692-dc530eec-f44e-497d-9aca-8c10f1819cb0.png)
2022-02-16 04:42:35 +00:00
Sagar Vora
a1ddd25dff fix: unable to delete role permissions 2021-10-08 15:36:58 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
dfccae5246 perf(minor): Permission Manager remove API
Delete using the filters directly instead of selecting rows in one query
and deleting those rows in another. DBMS would have to scan the table
twice prior
2021-07-28 19:05:27 +05:30
Aradhya-Tripathi
84ff1d0af9 style: removed frappe.db.sql comments 2021-07-28 13:48:01 +05:30
Aradhya-Tripathi
fa6cb14ee5 refactor: moved from raw queries to frappe orm in
core
2021-07-21 19:15:38 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Rohit Waghchaure
112784e7ae feat: custom user type with doctypes 2021-04-01 13:54:11 +05:30
prssanna
b95311728a style: fix formatting 2021-01-29 16:34:35 +05:30
Suraj Shetty
a2207d1174 style: Fix formatting issue 2021-01-29 15:58:29 +05:30
Suraj Shetty
21c020e036 style: Fix formatting issues 2021-01-29 15:43:11 +05:30
Suraj Shetty
b94d5778a8 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2021-01-19 10:36:50 +05:30
Shivam Mishra
53eda718b6
Merge pull request #12078 from scmmishra/permission-alert-flag 2021-01-06 12:51:17 +05:30
Saurabh
97b693c6b0
feat: Added permission to grant only Select access to document (#12063)
* feat: add permtype 'select' to DocPerm and CustomDocPerm

* feat: add 'select' perm in rights tupple

* feat: provisions to handle select permission

* feat: toggle href based on permissions

* feat: pass permission type explicitly while validating link in permission check

* fix: sider

* feat: added test cases to validate select perm

* feat: add method frappe.only_has_select_perm to explicitly check the select perm

* fix: if user only has select perm then do not show anchor tag for link fields

* fix: sider
2020-12-29 16:58:28 +05:30
Rushabh Mehta
54cee87826 fix(minor): tests + routing 2020-12-24 14:48:40 +05:30
Shivam Mishra
424c0c50f8 fix: set alert flag to false by default 2020-12-23 13:50:18 +05:30
Shivam Mishra
568426668f feat: add alert flag for permission validation
In case default permissions are not set, the alert flag will indicate if an alert has to be shown in the UI or not
2020-12-11 13:55:31 +05:30
Rushabh Mehta
75fe8a615a feat(app): move /desk to /app 2020-11-11 16:31:47 +05:30
Shivam Mishra
7a6b112bd6 fix: perm manager remove button 2020-10-19 14:42:41 +05:30
Shivam Mishra
42d97f84a2 feat: manage primary and secondary action lifecycle 2020-10-13 19:46:42 +05:30
Shivam Mishra
c0f8e698fb feat: refactor role perm manager
* New design
* Use modern constructor
* remove me = this hack
* replace $.each with forEach
* formatting fixes
2020-10-13 19:40:24 +05:30
Shivam Mishra
46df186833 chore: remove style 2020-10-13 19:40:24 +05:30
Shivam Mishra
65165b6be6 fix: translation syntax 2020-08-24 13:09:20 +05:30
Shivam Mishra
2655a3f8dc feat: freeze dom on updating permissions 2020-08-19 12:49:40 +05:30
Michelle Alva
fc3195537d
fix: change tooltip document types to type
In Role Permissions Manager, the tooltip for document type shows document types. Changed it to document type
2020-04-27 18:09:31 +05:30
Deepesh Garg
18664430c4 fix: Do not show create, write and delete perm in role permission manager for doctypes with in_create property set 2020-03-28 21:06:56 +05:30
Chinmay Pai
5243c6fb01
chore: add missing return statement (#8340)
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-09-04 18:40:17 +05:30
Suraj Shetty
aee7c67f8b refactor: Move get_users_with_role to utils.user 2019-03-21 21:06:54 +05:30