jsmrtn / craftagram

Grab Instagram content through the Instagram Basic Display API
Other
14 stars 8 forks source link

Add CP section #14

Closed jsmrtn closed 4 years ago

jsmrtn commented 4 years ago

Another thing to consider though is how to connect / install the instagram on production environments which may have allowAdminChanges: false — as you can't access or update settings section or plugins if this is set.

Originally posted by @isjackwild in https://github.com/scaramangagency/craftagram/issues/12#issuecomment-659462066

mijewe commented 4 years ago

It would also be useful to be able to assign Craftagram user permissions, so I can allow non-admins to hit the Authorise Craft button.

jsmrtn commented 4 years ago

Closed in 1.2.0.

@mijewe User permissions to access the CP section will be available under Permissions > General by default. You'll just need to tick it on for those non-admin users.

isjackwild commented 4 years ago

Just updated and these latest changes are really helpful, thanks!

One note though — perhaps it would be a good idea to hide the App ID and App Secret settings when allowAdminChanges => false. These two things you wouldn't want to be able to be changed in that scenario, but the authorise button you'd need in all environments. Just to prevent content managers from accidentally changing the API key ;)

jsmrtn commented 4 years ago

Why would you be giving access to generate the access token if they couldn't also modify the API credentials? In my opinion, either they would have access or not–once the token is generated, feasibly you should never need to authorise again.

Plus, if you're worried about token longevity you would use the refresh action.

isjackwild commented 4 years ago

It would be because you'd always need to click the authorize button once per environment (for example, on my production environment, I do not allow admin panel changes, but I'd still need to click to authorize the site when I first install the plugin)

jsmrtn commented 4 years ago

There's the real possibility that you could have different credentials for dev/staging/production, however. I appreciate the potential use-case but I don't think it's something we would look at introducing.

Thanks!

isjackwild commented 4 years ago

Okay no worries — the different credentials would be handled as environment variables ideally, but it's not a big issue either way. The current update is really helpful as it is already. :)