I have added --ACCESS=view published content in the first line of the data block in the hope of giving access to all users, even anonymous, to my report. In the drupal permissions settings, I've set the "view published content" permission to all roles, including anonymous.

However when I tried to access the /forena page, I get an access denied error, even as an authenticated user. In the particular report itself, I can see the parameter fields. However I could not see the resulting table/graph after submit. The same parameters are known to yield a result (table and graph) when I'm logged in as admin.

Have I overlooked something?

Update:
Adding permission to list reports takes care of the /forena page. The other issues still exist, even after allowing all permission to all users (in desperation). If a parameter is in the form of a dropdown selection field with values generated by a query, the items in the dropdown are not shown (only shows "none").

Using --ACCESS=access demo reports and allowing all users this permission does work (anonymous user can access the report). But as I understand it, we should be able to specify this --ACCESS to the same label as anything that is in the permissions page, right?

CommentFileSizeAuthor
#7 prefix-users-2324549.patch890 bytesmetzlerd
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

metzlerd’s picture

The /forena page is controlled by the "List reports" right. You need to grant access to users to avoid that error message.

Regarding your data blocks, in 7.x-3.x you need to specify a valid drupal right. In most cases to grant access everyone who has access to content on your site, this right should be:

--ACCESS=access content

In 7.x-4.x this model has changed a bit in that you can leave off the --ACCESS= comment and grant access all data in the report repository by granting access to "access myrepos data" in the permissions tab.

Hope this helps.

isantyas’s picture

Issue summary: View changes
metzlerd’s picture

Technically it needs to be a "right" that is tested by drupal's user_access. These used to be exactly the same as the label in drupal 6, but in drupal 7 developers can make the description of the "right" different than the label for the "right". You can look at the "roles" report provided by forena to see a listing of all of the strings that twill work in ACCESS= comments for a particular drupal role. Pick your anonymous user role to see the details. Note you may need to clear forena's cache after changing access=comments to have the report list display accurate data. Do this from the admin/structure/forena page.

isantyas’s picture

Very helpful, thanks.

isantyas’s picture

Hm.. trying that "roles" report gave me this error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '[my_db_name].users' doesn't exist: SELECT u.uid,u.name FROM {role} r JOIN {users_roles} ur ON r.rid=ur.rid JOIN users u ON ur.uid=u.uid WHERE r.rid = NULL ; Array ( ) in FrxDrupal->sqlData() (line 46 of [my_site_path]\sites\all\modules\forena\plugins\FrxDrupal.inc).

I notice that it's looking for .users table, without the prefix, even though my tables have been prefixed during drupal installation.

  • c81d120 committed on 7.x-3.x
    #2324549 User tables not prefixed.
    
metzlerd’s picture

Category: Support request » Bug report
Status: Active » Needs review
FileSize
890 bytes

Yes, that is a bug.. terribly sorry. Please modify the .sql files in forena/repos/drupal files (user_roles and users_in_role) to have the curly braces around the table names or apply the attached patch which will apply to 7.x-3.x or 7.x-4.x releases cleanly.

  • 48b0f55 committed on
    #2324549 User tables not prefixed.
    
metzlerd’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.