I'm seeing that the Edit Settings for a sheetnode permission does not work: I removed it for all kinds of user I've got available (admin, registered user and anonymous) and I'm still able to edit a sheetnode settings, lock tables, unlock them and so on. I tried logging out and loggin in to see if the permissions for a user are only checked at login.

CommentFileSizeAuthor
#6 Sheetnode-Trials.JPG45.46 KBnorgo
#5 d7sheetnode-v2.JPG26.16 KBnorgo

Comments

willhallonline’s picture

Status: Active » Postponed (maintainer needs more info)

Just wanted to check. Are you logged in as user 1? By default they are always allowed to do anything?

norgo’s picture

Situation is similar for me.

The toolbar also shows in view mode for unauthenticated user and functions like lock/unlock are functional.

Also the "Show toolbar in view mode" setting does not seem to work either i.e. it is always displayed and functional.

currently using 1.x-dev and tried a fresh socialcalc-master

norgo’s picture

sorry, I thought I discovered a pattern but I can not seem to replicate now.

It seems to be with a newer version of Social Calc Master.

I reverted to an old copy with files from 2013-11-30 and the toolbar is gone.

willhallonline’s picture

Status: Postponed (maintainer needs more info) » Active

Can you try using version 2.x as I have been working a lot more on that recently.

norgo’s picture

StatusFileSize
new26.16 KB

hi willhallonline

sorry for the delay on this.

I did try v2 a while back and the node ended up being blank i.e. nothing was being displayed, so reverted to an old version which works fine.

Today, tried a fresh install and still blank.

Possibly there is something I am missing with v2?

This applies to user 1 and anonymous and permissions seem to be in order.

user 1 logged in does not display anything either (image jpg)

here is a temp site
http://devd7sheetnode.norgo.com/test-sheetnode

norgo’s picture

StatusFileSize
new45.46 KB

Just following up on this.

Because the SocialCalc was a different size overall for InfoJunkie vs willhallonline, I tested each one on
1.0-beta6
1.x-dev
2.0-alpha1
so 6 variations.

The social calcs does not seem to affect anything, however, it is since the Social calc was last updated/committed that
1.0-beta6 and 1.x-dev show the toolbar even for anonymous users
2.0-alpha shows a blank screen

Just a note that
Show toolbar in view mode is OFF
and permissions are OFF for Anonymous.

The link
http://devd7sheetnode.norgo.com/test-sheetnode
is now with 1.x.dev and willhallonline's socialcalc

I can put it back to 2.0 since that is your focus.

I am avail for testing/helping.

Thanks

willhallonline’s picture

Hey norgo. Thanks for all of your tests. I am looking into it today and therefore will look at being able to provide some answers and will probably look at doing another release later today.

willhallonline’s picture

OK. The version that I have made successfully run (on my local install) is:

However, I can't confirm that you can't see sheetnode if you are anonymous user. I will look at it now.

norgo’s picture

Hi willhallonline

Sorry, seems this issue is has its branches :)... but noted to focus on v2 from now on.

~~~

I changed the version back to the above as suggested.

sheetnode-7.x-2.x (which is currently the same as alpha1)
with
socialcalc-1.0.0 (https://github.com/infojunkie/socialcalc/archive/1.0.0.zip)

and
http://devd7sheetnode.norgo.com/test-sheetnode

shows the empty space as before while logged in and while not.

Thanks

willhallonline’s picture

OK... I don't know but I dont think you can be running alpha1.

Can you check the code in sheetnode.module (lines 217-223). It should be like this:

function _sheetnode_inject($sheet_id, $sheet_aliases, $value, $save_element, $context) {
  $library_path = libraries_get_path('socialcalc');
  $module_path = drupal_get_path('module', 'sheetnode');
  drupal_add_js($library_path . '/socialcalc.min.js', array('weight' => 1));
  drupal_add_js($module_path . '/js/sheetnode.js', array('weight' => 2));
  drupal_add_css($library_path . '/socialcalc.min.css');
  drupal_add_css($module_path . '/css/sheetnode.css');
norgo’s picture

I confirmed the code. I have the same.

I made a 7th version based on your recent comments.

Possibly there is something else interfering.

Thank you

willhallonline’s picture

Try, if you can, to get a fresh install and try again? Disable other sheetnode modules?

norgo’s picture

did a fresh install and there was a librairies update 7.2.3 then reverted back to my demo and all is now good.

~~~

I guess now we return to the problem of this issue - permissions.

the permissions are open for non-edit mode i..e anonomous can see the toolbar, lock/unlock, change formats...

Please see

http://devd7sheetnode.norgo.com/test-sheetnode

Thank you

willhallonline’s picture

Great. So first off, the site still works on version 7.x-2.0-alpha1. That is good news.

Ok, onto the actual reason of this issue.

It seems that your sheetnodes are set to "Fiddle Mode", which allows users to change the spreadsheet, but they can't save changes.
If you don't want users to change the sheetnodes, select "Read-only spreadsheet" (which will give them the spreadsheet look but no ability to alter OR "HTML table" which will display the sheetnode in a html table, so with no functionality for sheetnodes (admin/config/content/sheetnode).

Also make sure that the checkbox, "Show toolbar in view mode" is not selected.

View mode is only relative to when viewing the nodes, not when editing them.

norgo’s picture

I am pretty sure all is the same from before v2, and fiddle mode gave the ability to change cells for caculation purposes

In the demo link above, there are screenshots of the settings
- view toolbar is off
- fiddle mode is on, but the toolbar shows and you can unlock, format, etc... cells

so permissions do not seem to get set for anonomus and in the past, only edit mode allowed for the full toolbar for authenticated users.

Possibly juancra, who started this issue, can confirm this is still the case?