Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
limbra
limbra
Commits
a7e85ca8
Commit
a7e85ca8
authored
Jun 17, 2017
by
LE GAC Renaud
Browse files
Add the controller publications/unlock_status.
parent
686e0399
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
controllers/publications.py
controllers/publications.py
+12
-1
No files found.
controllers/publications.py
View file @
a7e85ca8
...
...
@@ -3,7 +3,9 @@
"""
import
json
from
plugin_dbui
import
CALLBACK_ERRORS
from
plugin_dbui
import
CALLBACK_ERRORS
,
UNDEF_ID
SQL_UNLOCK
=
"UPDATE publications SET id_status=%i WHERE id=%s"
def
read
():
...
...
@@ -17,6 +19,15 @@ def read():
return
json
.
dumps
(
dict
(
success
=
True
,
data
=
row
.
as_dict
()))
def
unlock_status
():
"""Unlock the status OK bypassing the protection.
The publication identified by its id.
"""
# build a raw query to bypass protection (callback)
db
.
executesql
(
SQL_UNLOCK
%
(
UNDEF_ID
,
request
.
vars
.
id
))
def
update
():
"""Update a publication record identified by its id.
Design to update record from a basic Ext.form.Panel.
...
...
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