As an administrator, I've set up time slots and rooms for BoFs. Visiting /program/bofs shows that there are slots available and there are links in the BoF table to create a BoF node.

However, when I view /program/bofs as an authenticated user (not as admin), I do not see links to create a BoF anywhere.

I did double check the permissions for authenticated users and allow them to do the following:

-Create own value for field Room
-Create own value for field Time slot
-BoF Session: Create new content
-Schedule a BoF Session

I just want to make sure I'm not missing something obvious before I dive too deep into debugging this. It seems like somebody would have run into this by now. Does anybody else have this problem?

Comments

ezra-g’s picture

Status: Needs review » Active

Marking as "active" since there's nothing to review here.

primerg’s picture

Status: Active » Needs review
StatusFileSize
new2.24 KB

In order to allow to add bof sessions, the following permissions needs to be enabled for Authenticated users:
- Edit own value for field Room
- Edit own value for field Time slot
- Schedule a BoF Session
- View published content

"View published content" has to be explicitly added before you can create a node so I added it in the cod_base.

dsdeiz’s picture

Works on my end. Patch enables "View published content", "Schedule a BoF Session", "Edit own value for field Room" and "Edit own value for field Time slot" for Auth users. Dunno if it's worth also allowing "Create own value for field Room" and "Create own value for field Time slot" for Auth users. When creating a new bof session "Room" and "Time slot" are not accessible but after successfully creating the node and editing it afterwards, I see those 2 fields available for editing.

mjonesdinero’s picture

Patch works great..it automatically enables the "Views published content" for authenticated users as well as the Schedule a Bof Session, Edit own value for field Time slot and Edit own value for field Room.. yup as what is the comment above..Auth users cannot create room and time slot on bof sessions but they can edit it. Maybe we can make it possible for the auth users to create and edit her own value for field Time slot and field Room.

saltednut’s picture

Status: Needs review » Needs work

Patch applied but with whitespace errors:

auth-users-cannot-create-bof-1661620-2.patch:29: trailing whitespace.
auth-users-cannot-create-bof-1661620-2.patch:49: trailing whitespace.
warning: 2 lines add whitespace errors.

Permissions are for cod_session and cod_bof are overridden when I enable the cod_bof Feature after applying the patch.

Patch works but I think I'm missing something here: Wondering why an auth user can set BoF time slot and Room under this model...
- Are BoFs not proposed and moderated just like sessions?
- Shouldn't administrators be setting these values to ensure no topics get double booked? Ex: No one wants 16 cat lover BoF's taking over the entire schedule.

twardnw’s picture

BoFs are submitted by any authenticated user, and are not moderated like sessions.

A user is presented with a list/table of available time slots and rooms, given a 'schedule bof' link in each. This URL sets what time slot/room the BoF is to be scheduled in.

sheldonkreger’s picture

StatusFileSize
new295.34 KB
new819.12 KB

brantwynn makes an excellent point: auth users should not be able to CREATE time slots and rooms. However, they should be able to SELECT a time slot and room which has already been created AND is not already filled.

On the DrupalCon Munich and Denver sites, we have the site admins create Rooms and Time Slots, which contain fields to indicate whether BoFs can be scheduled in them. Authenticated users are directed to a page which lists all open rooms and time slots. They then click a button which directs them to node/add/bof with the time slot and room fields filled in already.

COD 7.x-1.x-dev is doing this by default, with a table of open time slots living at /program/bofs.

The major difference between COD and Munich is that, on Munich, Rooms and Time Slots have fields which designate if BoFs can be scheduled in them. Oftentimes we don't want to have certain Rooms or Time Slots to hold BoFs. Since only Admins can create Rooms and Time slots, we know exactly when and where BoFs can take place. Authenticated users just get to fill in those spaces, and only need permissions to do that.

The idea here is that Authenticated users should be able to create BofS, but NOT create new time slots and rooms.

Admins will need a way to control which Rooms and Time Slots allow BoF sessions. That discussion will continue here: http://drupal.org/node/1661614

sheldonkreger’s picture

StatusFileSize
new819.12 KB
new108.75 KB

Here is a screen shot to help visualize. I set up some test Rooms and Time slots in COD 7.x-1.x-dev. Here is what users are presented with at /program/bof

Auths click one of the open slots and are forwarded to /node/add/bof with the time slot and room value already filled in.

primerg’s picture

I do not think creating room and time slots are available for authenticated users (unless you explicitly allow them to). The permission here is to edit the existing room and timeslot values if you go directly to node/nid/edit. but if you follow the process, you are able to create the new bof, then go back to program/bofs and schedule your session.

I do agree that there should only be specific room available for bofs but I think this one is out of scope for this ticket.

primerg’s picture

if anyone can remove the trailing whitespace, that would be great. I already tried editing the source and recreate the patch, manually edit the lines in the patch but nothing changes. not sure what else to do.

mjonesdinero’s picture

Status: Needs work » Needs review

hi attach is the patch with out an tariling whitespace.
tested and working on my local

mjonesdinero’s picture

sorry forgot to attach the patch..my mistake here is it now..

primerg’s picture

patch applied cleanly.

sheldonkreger’s picture

Status: Needs review » Reviewed & tested by the community

#12 applies cleanly and works as expected. No whitespace.

I also agree that the discussion about restricting BoFs to certain rooms is out of the scope of this ticket - I just wanted to bring it into our awareness here.

sheldonkreger’s picture

Issue tags: +da_drupalcon

Tagging.

ezra-g’s picture

Status: Reviewed & tested by the community » Needs work

This patch grants "Access content" to authenticated users, but this permission should also be granted to anonymous users by default.

In terms of who should be able to schedule a BoF session, I could see the argument that only registered attendees should be able to schedule BoFs. Is that the DA's intention? If so, seems like this could be the default configuration following #1673036: Add "Attendee" Role.

twardnw’s picture

Yes, the DA's argument is that only registered attendees of the conference can propose/schedule BoFs.

sheldonkreger’s picture

This patch grants "Access content" to authenticated users, but this permission should also be granted to anonymous users by default.

I don't see a permission called "Access content" on the permissions list. Perhaps this is a typo - did you mean "View published content?" If so, anonymous users already have this by default.

Authenticated users - those who have registered for the event - should be able to schedule BoF sessions. They should be able to select a time slot and room for their BoF. But, only administrators should be able to create those time slots and rooms. Since rooms, time slots, and BoFs are all separate content types, this should not be a problem.

Patch in 12 applies cleanly and works as described.

primerg’s picture

patch - adds the anonymous users to view published content

primerg’s picture

Status: Needs work » Needs review

changing status

mjonesdinero’s picture

#19 patch applies cleanly, but if patch on this issue will make an error, i think it is because of the lines

like on this patch:

diff --git a/cod_base/cod_base.features.user_permission.inc b/cod_base/cod_base.features.user_permission.inc
index a5ac1ca..fa86755 100644
--- a/cod_base/cod_base.features.user_permission.inc
+++ b/cod_base/cod_base.features.user_permission.inc
@@ -10,6 +10,16 @@
 function cod_base_user_default_permissions() {
   $permissions = array();
 
+  // Exported permission: access content.
+  $permissions['access content'] = array(
+    'name' => 'access content',

while on this issue issue:

diff --git a/cod_base/cod_base.features.user_permission.inc b/cod_base/cod_base.features.user_permission.inc
index a5ac1ca..9f95770 100644
--- a/cod_base/cod_base.features.user_permission.inc
+++ b/cod_base/cod_base.features.user_permission.inc
@@ -10,7 +10,7 @@
 function cod_base_user_default_permissions() {
   $permissions = array();
 
-  // Exported permission: access administration pages
+  // Exported permission: access administration pages.

The error is just that it cannot locate the line that is present on the patch.

twardnw’s picture

Patch applies clean.

Does not test out though. Created an user account, they were able to select a time slot/room from the scheduler and save the new node, but it did not save with the selected time/room. User was able to edit and add the room and time slot afterward though.

twardnw’s picture

Status: Needs review » Needs work

Auth users are not being granted permission to create their own value for room and time slot.

twardnw’s picture

Status: Needs work » Needs review
StatusFileSize
new13.67 KB

re-rolled with needed permissions.

primerg’s picture

As an authenticated user, I can create a node by going to /node/add but I couldn't schedule a bof session. Upon checking, this was forgotten

+  // Exported permission: schedule bof_session.
+  $permissions['schedule bof_session'] = array(
+    'name' => 'schedule bof_session',
+    'roles' => array(
+      0 => 'authenticated user',
+    ),
+    'module' => 'cod_session',
+  );

I couldn't make a clean patch though so I'm just noting it here.

primerg’s picture

Status: Needs review » Needs work
mjonesdinero’s picture

Status: Needs work » Needs review
StatusFileSize
new13.9 KB

re-rolled the patch with the comment on #24

primerg’s picture

works as described.

twardnw’s picture

Status: Needs review » Needs work

applying this patch puts cod_base into a state of 'Needs Review'.

twardnw’s picture

Status: Needs work » Postponed

I went digging into this, starting from #2 changes are being included on cod_base, this patch should only touch cod_bof. Also, this patch deals with field level permissions for time slots and rooms, and based on #1668908: Replace User reference, Nodereference with References, Vertical session schedule view, these fields will be changing to use entity reference. Let's postpone till that issue is resolved.

sheldonkreger’s picture

Yes, we really need to have a solid system in place for handling permissions before we can make progress here. Ezra-g has asked in the past that all of the settings for BoFs, Sessions, Evaluations, etc. be compartmentalized within their respective features. Let's make sure the next round of patches respects that insight.

primerg’s picture

primerg’s picture

Since I'm already working on bof, I already tested this. Still postponed and need the following issues to be RTBC:
- #1698454: Room and Timeslot permissions
- #1698306: Replace node_reference with entity references in cod_bofs

Once those 2 are resolved, the only thing needed for this to work is:

+  // Exported permission: schedule bof_session.
+  $permissions['schedule bof_session'] = array(
+    'name' => 'schedule bof_session',
+    'roles' => array(
+      0 => 'authenticated user',
+    ),
+    'module' => 'cod_session',
+  );
+
primerg’s picture

Status: Postponed » Needs review
StatusFileSize
new604 bytes

please review

dsdeiz’s picture

Works on my end. And can schedule a bof session.

mjonesdinero’s picture

works on my end also, patch applies cleanly and i can also schedule a bof session

twardnw’s picture

Should I apply this or #1661614-12: BoF and Sessions Should Not Be Allowed in Overlapping Rooms and Time Slots first? They do conflict with each other.

sheldonkreger’s picture

Status: Needs review » Postponed

We're going to finalize issue 1661614 first.

twardnw’s picture

Status: Postponed » Needs work
primerg’s picture

Just tested it and it works fine now (no patch needed)

twardnw’s picture

I think you might be working from an out-of-date sandbox, I'm getting an error when applying against the latest version.

primerg’s picture

Status: Needs work » Needs review
StatusFileSize
new4.33 KB

i might have. here is the patch that adds field permission level to add room and timeslot for bofs

twardnw’s picture

Looked good, but for some overrides on field permissions in cod_session. This patch should handle those.

sheldonkreger’s picture

Status: Needs review » Reviewed & tested by the community

43 is clean and without overrides. All of the correct permissions are in place.

japerry’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new21.22 KB

Re-roll of patch against 7.x-1.x cod for bofs. should fix this and #1699272: cod_bof view should work with single column sessions schedule and tabs

sheldonkreger’s picture

Status: Needs review » Needs work

Thanks for the help!

I set up a new dev environment and cloned into the current cod_support branch. Patch in #45 applies cleanly but does not work. I'm getting the following error message after attempting to enable cod_bof inside of Features.

"FieldException: Cannot change an existing field's type. in field_update_field() (line 234 of myDrupal/modules/field/field.crud.inc)"

My workflow:

1. Enable cod_base (default!)

2. Enable cod_session (overridden)

3. Enable cod_base (error message above)

ezra-g’s picture

Status: Needs work » Needs review

"FieldException: Cannot change an existing field's type. in field_update_field() (line 234 of myDrupal/modules/field/field.crud.inc)"

Yes - you'll need to do a fresh install to test this. Marking back to needs review.

japerry’s picture

Status: Needs review » Needs work

Since we make changes from node_reference to entityreferences, you must wipe the database and make sure nothing is enabled before you apply the patch. Otherwise it will fail.

I'm somewhat in favor of getting these patches into the core -- then opening new issues based on these patches, because they're all inter-related. (Session migrate, BOF, and Evaluations)

ezra-g’s picture

Status: Needs work » Needs review
saltednut’s picture

Status: Needs review » Needs work

I'm somewhat in favor of getting these patches into the core -- then opening new issues based on these patches, because they're all inter-related. (Session migrate, BOF, and Evaluations)

<bikeshed>Yes we've all been pushing for this for some time (no pun intended). It just so happens that the gestation of such a major architectural change requires multiple rounds of revisions on numerous endpoints. Let's all be patient with the maintainers and reroll whenever necessary. I don't agree that new issues are necessary- there's a lot of work that we've done which should not just be left behind when a simple re-roll is sufficient.

Sorry that these threads have gone on for so long - I'm sure its a lot to onboard oneself. We've all gone through this process when working on Drupal - it is the nature of issue queues I suppose.</bikeshed>

saltednut’s picture

Status: Needs work » Needs review

sorry - posted same time as ezra-g

sheldonkreger’s picture

Status: Needs review » Needs work

#45 still isn't working for me. I'm working with a 100% fresh install, clean database, etc. All I've done is log in, enable Features, then try to enable cod_bof.

I'm still getting "FieldException: Cannot change an existing field's type. in field_update_field() (line 234 of myDrupal/modules/field/field.crud.inc)" when I try to enable cod_bofs.

Has anybody else tested this? Perhaps I need to apply #1668908: Replace User reference, Nodereference with References, Vertical session schedule view first?

twardnw’s picture

have to apply #1668908: Replace User reference, Nodereference with References, Vertical session schedule view first ;) japerry should have noted this ;)

Applies clean for me, seeing overrides on cod_bof_session

Component: field
            'module' => 'text',
            'type' => 'text_default',
>         ),
>         'listing' => array(
>           'label' => 'above',
>           'type' => 'hidden',
          ),
          'teaser' => array(
            'type' => 'entityreference_label',
            'weight' => 1,
>         ),
>         'listing' => array(
>           'label' => 'above',
>           'type' => 'hidden',
          ),
          'teaser' => array(
            'type' => 'entityreference_label',
            'weight' => 2,
>         ),
>         'listing' => array(
>           'label' => 'above',
>           'type' => 'hidden',
          ),
          'teaser' => array(

A visit to program/bofs shows my rooms and time slots, but that 'authenticated' user is not able to create/schedule a BoF. Checked over the permissions, the 'Schedule a BoF Session' is allowed for the authenticated role, as well as the 'create own value' permission on field_room and field_slot.

twardnw’s picture

So it appears that it is only the link that is missing. Something to do with cod_session_schedule_access ? going to node/add/bof-session I am able to create a bof and assign it to an unused room/time, and it does show up in the schedule. Just unable to track down why I am not being presented with the 'add a bof session' link on program/bofs

Also, when viewing my newly created bof I see an error:

Notice: Undefined property: stdClass::$field_accepted in cod_session_is_accepted() (line 526 of /Users/twardnw/Sites/cod7.dev/sites/all/modules/cod_support/cod_session/cod_session.module).

twardnw’s picture

Well, I guess I should always set up a more realistic test for this. I added a second room, and wow, whaddya know, the schedule(r) works!

primerg’s picture

im adding a patch to remove the WSOD in #45. This is by no means a solution but Im just providing a cleaner install that might be used to recreate the bof using the new tab display. I think the right ticket for the new tab display is #1699272: cod_bof view should work with single column sessions schedule and tabs

Here are some notes I have:
1. Reverted the patch to use the old views format "Session schedule grid". The quicktab format used in the session views will only work with pre-defined timeslot and room. the bof page dont have them yet and instead we create links for every available room and timeslot so I don't think this format will work for Bofs. #1699272
2. with the recent change in the session tab display, this line was still included $view->cod_schedule_display. Not sure what the plans is for that. this variable is still in use in the tpl file. I just added a value of 0 to simply make it work but it should be removed or updated. #1699272
3. remove the menu hook "program/bofs" because that is using the old session tab solution. I created it by creating a new page in the bof view.
4. There was an agreement here #1698454-2: Room and Timeslot permissions to use "Create value for field Room/Time slot" to allow creation of bof sessions. Some part of the patch were committed in #45 but some part were not -- specifically changes made in the cod_session_schedule_access(). This is added in this patch (for anyone wondering why cod_session code is in the patch)

ezra-g’s picture

Status: Needs work » Closed (duplicate)

Marking as a duplicate of #1699272: cod_bof view should work with single column sessions schedule and tabs since these issues share underlying architecture work and are both part of the same goal: Make COD BoF work.