boboldehampsink / pushnotifications

DEPRECATED - Push Notifications (iOS/Android) plugin for Craft CMS
MIT License
20 stars 6 forks source link

User-Level Permissions for apps #2

Open sandy-abrightmind opened 9 years ago

sandy-abrightmind commented 9 years ago

Hi, Is there any way to add user-level permissions for who sees each application?

Basically, I am wanting to give different groups permissions to different applications. However, I don't want them to see other groups applications.

I know currently if I set a User-Group to have permissions of the pushnotifications plugin then that group sees every application created. However, I need to be able to set the permissions for each application to only specific user-groups.

Is there any way to add this into the plugin?

Thank again! Sandy Davis

boboldehampsink commented 9 years ago

Not currently, but I have put it on the roadmap

sandy-abrightmind commented 9 years ago

Is there any way to create a new push notification without needing permissions to the "push notification" plugin -- like through a web page?

Basically, I'm just curious if there is another way to send notifications so that I can possibly work around this until group user-level permissions is added to the plugin.

Do you know when this enhancement will be added?

Thanks!! =)

boboldehampsink commented 9 years ago

There's two possibilities I can think of atm:

sandy-abrightmind commented 9 years ago

I'm assuming that the first option is for me to add the enhancement. PR means Pull Request?

I'm new to CraftCMS so I'm not 100% sure of where to begin on the plugin. But I don't mind diving into the code to see if I can figure that out.

Do you have any suggestions on where to start?

boboldehampsink commented 9 years ago

Yes, it's Pull Request.

I would look at this and at this

sandy-abrightmind commented 9 years ago

I've never contributed to a project before -- so I just want to double check with you -- but when I clone the github project to my desktop -- should I clone it to the [crafts/plugins] folder that's located in htdocs?

I've never created a plugin before -- so I'm unsure how to test this.

Any tips is greatly appreciated. Thanks!

Thanks again! =)

boboldehampsink commented 9 years ago

Yeah you should test it in a running Craft instance

sandy-abrightmind commented 9 years ago

Hey, I'm running into issues with the source code. This is without any of my changes.

I'm getting this error:

Invalid argument supplied for foreach()

CraftCMS/craft/plugins/pushnotifications/models/PushNotifications_AppModel.php(51)

I'm not sure why I am getting this warning since I didn't make any changes to that file. I re-downloaded the source by cloning it to my desktop to make sure that none of my changes were causing this. This occurs with and without my code changes.

This warning occurs when I go to create a new notification and I select the application name.

Any ideas of what's going on?

sandy-abrightmind commented 9 years ago

This happens when I don't fill out the commands option on the application configuration page.

Commands Predefine commands to send with a notification.

I am assuming this is for cronjob configurations? My assumption was that this field is optional.

The only way I can get around this for testing the application is to enter an empty configuration for that field.

sandy-abrightmind commented 9 years ago

I sent you a pull request. I have added User-Level Permissions. Let me know what you think.

Thanks! Sandy Davis