Skip to content

Commit

Permalink
Pick up leftovers: lock dangerous functions, update dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
gandie committed Mar 24, 2024
1 parent 0c80ef5 commit bf415ca
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 142 deletions.
135 changes: 0 additions & 135 deletions mounts/zoperepo/__root__/__meta__
Original file line number Diff line number Diff line change
Expand Up @@ -5,130 +5,10 @@
'Anonymous',
'Manager',
]),
('Add Accelerated HTTP Cache Managers', False, [
'Manager',
]),
('Add Database Methods', False, [
'Manager',
]),
('Add Documents, Images, and Files', False, [
'Manager',
]),
('Add External Methods', False, [
'Manager',
]),
('Add Folders', False, [
'Manager',
]),
('Add MailHost objects', False, [
'Manager',
]),
('Add Page Templates', False, [
'Manager',
]),
('Add Python Scripts', False, [
'Manager',
]),
('Add RAM Cache Managers', False, [
'Manager',
]),
('Add Site Roots', False, [
'Manager',
]),
('Add User Folders', False, [
'Manager',
]),
('Add Virtual Host Monsters', False, [
'Manager',
]),
('Add Z Psycopg 2 Database Connections', False, [
'Manager',
]),
('Change DTML Documents', False, [
'Manager',
]),
('Change DTML Methods', False, [
'Manager',
]),
('Change Database Connections', False, [
'Manager',
]),
('Change Database Methods', False, [
'Manager',
]),
('Change External Methods', False, [
'Manager',
]),
('Change Images and Files', False, [
'Manager',
]),
('Change Lock Information', False, [
'Manager',
]),
('Change Page Templates', False, [
'Manager',
]),
('Change Python Scripts', False, [
'Manager',
]),
('Change bindings', False, [
'Manager',
]),
('Change cache managers', False, [
'Manager',
]),
('Change cache settings', False, [
'Manager',
]),
('Change configuration', False, [
'Manager',
]),
('Change permissions', False, [
'Manager',
]),
('Change proxy roles', False, [
'Manager',
]),
('Copy or Move', False, [
'Anonymous',
'Manager',
]),
('Define permissions', False, [
'Manager',
]),
('Delete objects', False, [
'Manager',
]),
('FTP access', False, [
'Manager',
]),
('Import/Export objects', False, [
'Manager',
]),
('Log Site Errors', False, [
'Manager',
]),
('Log to the Event Log', False, [
'Manager',
]),
('Manage Five local sites', False, [
'Manager',
]),
('Manage Site', False, [
'Manager',
]),
('Manage WebDAV Locks', False, [
'Manager',
]),
('Manage properties', False, [
'Manager',
]),
('Manage users', False, [
'Manager',
]),
('Open/Close Database Connection', False, [
'Manager',
]),
('Private, only accessible from trusted code', False, [
]),
('Public, everyone can access', False, [
Expand All @@ -137,29 +17,14 @@
('Take ownership', False, [
'Owner',
]),
('Test Database Connections', False, [
'Manager',
]),
('Undo changes', False, [
'Manager',
]),
('Use Database Methods', False, [
'Anonymous',
'Manager',
]),
('Use mailhost services', False, [
'Manager',
]),
('View', False, [
'Anonymous',
'Manager',
]),
('View History', False, [
'Manager',
]),
('View management screens', False, [
'Manager',
]),
('WebDAV Lock items', False, [
'Manager',
'Owner',
Expand Down
2 changes: 2 additions & 0 deletions mounts/zoperepo/__root__/choreo/db_init_wrapper/__source__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
return "Locked"

context.init.initdb_q()

return "DB (re-)initialized!"
6 changes: 6 additions & 0 deletions mounts/zoperepo/__root__/choreo/delete/__source__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
request = container.REQUEST
response = request.response

'''
context.delete_q(choreo_id=choreo_id)
res = {
'msg': 'Choreo-ID %s deleted!' % choreo_id
}
'''
res = {
'msg': 'Locked'
}


response.setHeader('Content-Type', 'application/json')

Expand Down
3 changes: 0 additions & 3 deletions mounts/zoperepo/__root__/master_pt/__source-utf8__.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
<link href="lib/css/fa_solid_css" rel="stylesheet"/>

<script src="lib/js/bootstrap_js"></script>

<script src="lib/js/handlebars_js"></script>

<script src="lib/js/custom_tools_js"></script>

<script src="lib/js/jquery-3.6.3.min.js"></script>

<script src="lib/js/p5.js"></script>
Expand All @@ -22,7 +20,6 @@
<script src="lib/js/tourguide.js"></script>
<script src="lib/js/start_tut_js"></script>


</head>
<body>
<a href="/index_html">
Expand Down
5 changes: 5 additions & 0 deletions mounts/zoperepo/__root__/migration/__meta__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
('owner', (['acl_users'], 'dockerzope')),
('title', ''),
('type', 'Folder'),
]
14 changes: 14 additions & 0 deletions mounts/zoperepo/__root__/migration/reset_sequences_q/__meta__
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
('advanced', [
('cache_time', 0),
('class_file', ''),
('class_name', ''),
('connection_hook', None),
('max_cache', 100),
('max_rows', 1000),
]),
('args', ''),
('connection_id', 'composedb'),
('title', ''),
('type', 'Z SQL Method'),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
select setval('rawdata_rawdata_id_seq', (select max(rawdata_id) from rawdata));
select setval('choreo_choreo_id_seq', (select max(choreo_id) from choreo));
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ async function predictWebcam() {
}
canvasCtx.restore();
if (broadcast_running) {
/// XXX: Make landmarks pickable!
let to_send = JSON.stringify(result.landmarks);
websocket.send(to_send);
}
Expand Down
6 changes: 4 additions & 2 deletions zeodbsync/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install \
iproute2 \
tree -y

RUN pip3 install zope \
zope.mkzeoinstance \

RUN pip3 install Zope[wsgi]==5.9 -c https://zopefoundation.github.io/Zope/releases/5.9/constraints.txt

RUN pip3 install zope.mkzeoinstance \
psycopg2-binary \
git+https://github.com/gandie/Products.PythonScripts@hacked-python-scripts \
Products.ZSQLMethods \
Expand Down
5 changes: 3 additions & 2 deletions zope/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install \
tree \
ffmpeg -y

RUN pip3 install zope \
psycopg2-binary \
RUN pip3 install Zope[wsgi]==5.9 -c https://zopefoundation.github.io/Zope/releases/5.9/constraints.txt

RUN pip3 install psycopg2-binary \
git+https://github.com/gandie/Products.PythonScripts@hacked-python-scripts \
Products.ZSQLMethods \
Products.SiteErrorLog \
Expand Down

0 comments on commit bf415ca

Please sign in to comment.