pushnotifications icon indicating copy to clipboard operation
pushnotifications copied to clipboard

User-Level Permissions for apps

Open sandy-abrightmind opened this issue 10 years ago • 10 comments
trafficstars

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

sandy-abrightmind avatar Oct 15 '15 17:10 sandy-abrightmind

Not currently, but I have put it on the roadmap

boboldehampsink avatar Oct 15 '15 17:10 boboldehampsink

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!! =)

sandy-abrightmind avatar Oct 15 '15 17:10 sandy-abrightmind

There's two possibilities I can think of atm:

  • Fork this repo, build it in, submit PR ;-)
  • Use js/css to hide what they shouldn't see

boboldehampsink avatar Oct 15 '15 17:10 boboldehampsink

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?

sandy-abrightmind avatar Oct 15 '15 17:10 sandy-abrightmind

Yes, it's Pull Request.

I would look at this and at this

boboldehampsink avatar Oct 16 '15 06:10 boboldehampsink

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! =)

sandy-abrightmind avatar Oct 16 '15 16:10 sandy-abrightmind

Yeah you should test it in a running Craft instance

boboldehampsink avatar Oct 17 '15 08:10 boboldehampsink

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 avatar Oct 26 '15 16:10 sandy-abrightmind

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 avatar Oct 26 '15 16:10 sandy-abrightmind

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

Thanks! Sandy Davis

sandy-abrightmind avatar Oct 28 '15 17:10 sandy-abrightmind