kalamuna / playbox

A playground for ambitious would-be code artists.
http://live-playbox.at.kalamuna.com/
GNU General Public License v2.0
5 stars 29 forks source link

Battle authors #110

Closed shellshocked59 closed 9 years ago

shellshocked59 commented 9 years ago

Here I added code to fulfill #104, #102, and part of #105. In playbox_admin I added a new configuration page for site-wide configuration that binds fields to each user, replicating the functionality of the global site configuration page but on a per-user basis.

I added a dashboard module that has a simple module-driven page with a list of options for a logged in user accessing "playbox-battles/dashboard" with proper permission. I wasn't sure where to link a user to this page within the site, so for not it's just accessible via URL. I could change logins to redirect to this page.

I updated the permissions on the admin form to a unique permission name (it was previously set to 'administer my module') and changed the hook_menu description on 'scores' from the default.

reynoldsalec commented 9 years ago

For some reason Features isn't correctly reverting to give the Battle Authors role the "View battle dashboard" permission, had to set that manually, even though it looks like that has been correctly stored in the playbox_admin feature.

Verified that the various user settings (#104) work.

It looks like users haven't been given permission to create battles in this PR (#102), had to set that manually.

Once I did that, I was able to verify that the new user dashboard does show a "Create Battles link", although it does not have a list of all the battles that the user has created (which is also indicated in #105).

Getting several warning notifications, probably need a couple isset checks:

Warning: Illegal string offset 'entity_id' in playbox_admin_views_pre_view() (line 83 of /data/sites/all/modules/playbox_admin/playbox_admin.module). Warning: Illegal string offset 'entity_id' in playbox_admin_views_pre_view() (line 87 of /data/sites/all/modules/playbox_admin/playbox_admin.module).

Overall looking good, to finish this PR...

shellshocked59 commented 9 years ago

Alright let's try this again. I tested with a fresh DB pull and it's all looking good to me now.

I added conditional checking, it was an issue for users who didn't have the new fields set. I added a view on the dashboard, I missed this as a feature last time. I used the existing playbox_battles view for this. I added the new permissions to the playbox_admin user permissions feature. You'll need to update this feature at /admin/structure/features/playbox_battles/recreate screen shot 2015-05-13 at 10 02 56 pm

I look forward to meeting you all a Drupalcon tomorrow!

reynoldsalec commented 9 years ago

Merged in the rest of this work, the dashboard looks great! Looks like we're still missing a default permission in the playbox_battle feature to allow Administrator users to create battles, but otherwise very down with this general groove @shellshocked59.