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.
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
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.
* 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
* 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
* Add button to delete user permissions in bulk
* Show no records deleted the delete count is 0
* Return this from show of dialog to make it chainable
* Add test for clear user permissions function
* Fix test
* Format code
* Reset the user
* Remove rollback from test
* Move clear user permission button to menu
* fix: Translations
* Allow user to access list even if there is only a docperm with if owner enabled
* Add test to check if user gets access to the list
- User should be able to access list even if the user has only
role for which docperm is created with if_owner check
* Remove commented code