We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit d038d0fa authored by Evan Prodromou's avatar Evan Prodromou

AtomPub-related actions are only read-only on GET

parent 8a21b13e
...@@ -171,9 +171,14 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction ...@@ -171,9 +171,14 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return true; if ($_SERVER['REQUEST_METHOD'] == 'GET') {
return true;
} else {
return false;
}
} }
/** /**
......
...@@ -241,9 +241,14 @@ class ApiTimelineUserAction extends ApiBareAuthAction ...@@ -241,9 +241,14 @@ class ApiTimelineUserAction extends ApiBareAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return true; if ($_SERVER['REQUEST_METHOD'] == 'GET') {
return true;
} else {
return false;
}
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment