summaryrefslogtreecommitdiff
path: root/public/app/controllers/Office.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/controllers/Office.php')
-rw-r--r--public/app/controllers/Office.php26
1 files changed, 25 insertions, 1 deletions
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php
index f57cf08..c67249a 100644
--- a/public/app/controllers/Office.php
+++ b/public/app/controllers/Office.php
@@ -327,9 +327,21 @@ class Office {
+ public static function all_petitions()
+ {
+ if (Auth::in_admin_group()) {
+ Render::json([
+ 'success' => true,
+ 'data' => Content_model::all_petitions()
+ ]);
+ }
+ }
+
+
+
public static function petition_copy($sign)
{
- if (false) { //(Auth::in_admin_group()) {
+ if (Auth::in_admin_group()) {
$petition = Content_model::get_petition(['signature' => $sign]);
} else {
@@ -407,7 +419,19 @@ class Office {
## ADMIN METHODS (insert, updated etc.)
## -------------------------------------------------------------------------
+ /** set_protocol
+ * ---
+ */
+ public static function set_protocol()
+ {
+ if (Auth::in_admin_group()) {
+ $post = Registry::get('REQUEST')->POST;
+ Content_model::set_protocol( $post['id'], $post['protocol'] );
+ }
+ Render::json(['success' => true]);
+ }
+
/** files
* echo all files
*