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
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
173a9f37
Commit
173a9f37
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
3cb786cc
Pipeline
#23068
failed with stage
in 0 seconds
Changes
1
Pipelines
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 @
173a9f37
...
@@ -15,31 +15,12 @@
...
@@ -15,31 +15,12 @@
from
threading
import
local
from
threading
import
local
from
Acquisition
import
aq_inner
,
aq_parent
from
Acquisition
import
aq_inner
,
aq_parent
from
AccessControl.PermissionRole
import
_what_not_even_god_should_do
from
AccessControl.User
import
SimpleUser
from
AccessControl.User
import
BasicUser
,
SimpleUser
from
App.config
import
getConfiguration
from
App.config
import
getConfiguration
from
..TransactionalVariable
import
TransactionalVariable
from
..TransactionalVariable
import
TransactionalVariable
DEVELOPER_ROLE_ID
=
'Developer'
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
SimpleUser_getRoles
=
SimpleUser
.
getRoles
def
getRoles
(
self
,
_transactional_variable_pool
=
local
()):
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