Forums | Mahara Community

Support /
Submitted views are "access denied"


Howard Miller's profile picture
Posts: 191

03 February 2015, 1:26

I had a reported problem that views submitted for marking to a group could not be view (Access denied). On a bit of digging, it seems (to me) that the data in the view_access table is highly suspected. 

If I pick one of the users who has submitted (although it applies to all of them) and look them up in this table, there's no record for the view...

select * from view_access where usr=14205;
+-------+------------+-------+------+-------+-------------+-------+---------+-----------+----------+---------------+-----------------+---------------------+
| view | accesstype | group | role | usr | institution | token | visible | startdate | stopdate | allowcomments | approvecomments | ctime |
+-------+------------+-------+------+-------+-------------+-------+---------+-----------+----------+---------------+-----------------+---------------------+
| 44406 | NULL | NULL | NULL | 14205 | NULL | NULL | 1 | NULL | NULL | 0 | 1 | 2014-08-27 11:31:29 |
| 44337 | NULL | NULL | NULL | 14205 | NULL | NULL | 1 | NULL | NULL | 0 | 1 | 2014-08-27 11:31:29 |
| 44339 | NULL | NULL | NULL | 14205 | NULL | NULL | 1 | NULL | NULL | 0 | 1 | 2014-08-27 11:31:29 |
| 44377 | NULL | NULL | NULL | 14205 | NULL | NULL | 1 | NULL | NULL | 0 | 1 | 2014-08-27 11:31:29 |
| 44407 | NULL | NULL | NULL | 14205 | NULL | NULL | 1 | NULL | NULL | 0 | 1 | 2014-08-27 11:31:29 |
| 44340 | NULL | NULL | NULL | 14205 | NULL | NULL | 1 | NULL | NULL | 0 | 1 | 2014-08-27 11:31:29 |
+-------

If I look up the view in this table there is a record, but it's full of NULLs and it does not point to the user. 

select * from view_access where view=42135\G
*************************** 1. row ***************************
view: 42135
accesstype: NULL
group: NULL
role: NULL
usr: NULL
institution: NULL
token: 9Dcz0Perpkytmvji8nXG
visible: 1
startdate: NULL
stopdate: NULL
allowcomments: 0
approvecomments: 1
ctime: 2015-01-22 13:45:58
1 row in set (0.00 sec)

The result is that View::user_access returns a single record (full of NULLs) such that can_view_view() (in lib/mahara.php) drops through false as it has 'nothing to go on'. 

Thoughts appreciated :)

Kristina Hoeppner's profile picture
Posts: 4863

03 February 2015, 8:59

Hello Howard,

Can you please confirm that the pages have been submitted correctly to the group and appear in the section on the group homepage for submitted pages? Or have the pages been shared only with individual people?

Pages submitted to a group are only accessible to admins and tutors in the group but not other group members.

Thank you

Kristina

 

Howard Miller's profile picture
Posts: 191

03 February 2015, 10:30

Hi Kristina,

Yes - there are about 5 submissions in the submission section right at the bottom of the group page. I am 'logged in as' the group administrator and clicking them results in Access Denied. The actual administrators confirm this. 

The users who have shared them have no control (now) over them although they can view them. Basically the views are stuck in submitted state. 

The only other thing that may be relevant is that they where all submitted in the middle of 2014. I'm not sure what has been done to the group since. The group administrator (Hi Gordon!!) has been known to be a bit "creative" with things but I'm unaware of any foul play this time :)

Kristina Hoeppner's profile picture
Posts: 4863

04 February 2015, 9:25

Hello Howard,

Mhh. Not much I can do without seeing group settings etc. or what the access permissions are on those pages which might be easier done in the database.

What you could try: Untick "Allow submissions" in the group settings and save. The section should disappear on the homepage and then tick the "Allow submissions" again and see if you gain access again. Maybe a setting didn't quite take after an update.

If that doesn't help, then you'd have to check in the database I think and find out why the submission doesn't take.

Cheers

Kristina

 

4 results