Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
286
Merge Requests
38
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
9cf1c454
Commit
9cf1c454
authored
9 hours ago
by
Mark Harding
Browse files
Options
Download
(chore): api/v2/analytics only GET should be restricted not entire endpoint
parent
c5ccd1c0
master
No related merge requests found
Pipeline
#98140045
waiting for manual action with stages
in 7 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Controllers/api/v2/analytics.php
View file @
9cf1c454
...
...
@@ -7,10 +7,18 @@ use Minds\Core;
use
Minds\Core\Di\Di
;
use
Minds\Interfaces
;
class
analytics
implements
Interfaces\Api
,
Interfaces\Api
Admi
nPam
class
analytics
implements
Interfaces\Api
,
Interfaces\Api
Ignore
nPam
{
public
function
get
(
$pages
)
{
// Temporary require admin
if
(
!
Core\Session
::
isAdmin
())
{
return
Factory
::
response
([
'status'
=>
'error'
,
'message'
=>
'Only admins can view these analytics. Use the dashboards instead.'
,
]);
}
if
(
!
isset
(
$pages
[
0
]))
{
return
Factory
::
response
([
'status'
=>
'error'
,
...
...
This diff is collapsed.
Please
register
or
sign in
to comment