Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
6c6a8098
Commit
6c6a8098
authored
Aug 23, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Type/patches/User: drop BasicUser.allowed patch
This patch does not seem necessary
parent
5dde17a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
20 deletions
+1
-20
product/ERP5Type/patches/User.py
product/ERP5Type/patches/User.py
+1
-20
No files found.
product/ERP5Type/patches/User.py
View file @
6c6a8098
...
...
@@ -15,31 +15,12 @@
from
threading
import
local
from
Acquisition
import
aq_inner
,
aq_parent
from
AccessControl.PermissionRole
import
_what_not_even_god_should_do
from
AccessControl.User
import
BasicUser
,
SimpleUser
from
AccessControl.User
import
SimpleUser
from
App.config
import
getConfiguration
from
..TransactionalVariable
import
TransactionalVariable
DEVELOPER_ROLE_ID
=
'Developer'
BasicUser_allowed
=
BasicUser
.
allowed
def
allowed
(
self
,
object
,
object_roles
=
None
):
"""
Check if the user has Developer role which allows to modify ZODB source code
and remove it, as it should never be acquired anyhow, before calling the
original method
"""
# Skip "self._check_context(object)"
if
(
object_roles
is
not
_what_not_even_god_should_do
and
object_roles
is
not
None
and
DEVELOPER_ROLE_ID
in
set
(
object_roles
or
()).
intersection
(
self
.
getRoles
())
):
return
1
return
BasicUser_allowed
(
self
,
object
,
object_roles
)
BasicUser
.
allowed
=
allowed
SimpleUser_getRoles
=
SimpleUser
.
getRoles
def
getRoles
(
self
,
_transactional_variable_pool
=
local
()):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment