Topic-icon Setting Access Permissions for JFBConnect Channels

Active Subscriptions:

None
I am trying to set up a member group that only has access to the JFBConnect component. (This will be used in my app approval process to provide access to Facebook).
I have set up a new group and viewing level, set the Joomla access permissions, as well as the JFBConnect component access permissions.

I am able to appropriately access only the JFBConnect component from the backend and all elements except CHANNELS, even though I have access approved for all JFBConnect elements. It seems only the SUPER USER group has access to the CHANNELS are of the component.

What am I missing? How can I give a Joomla User group access to CHANNELS?

dlewintx
The topic has been locked.
Support Specialist
5 years 7 months ago #64499 by alzander
It looks like an omission on our part for including the proper permission. Can you edit the following file:
/administrator/components/com_jfbconnect/access.xml
In the group of action elements, add the following:
<action name="jfbconnect.channels.manage" title="Channel Management" description="The user is able to manage channels"/>

After that, you should be able to set the proper permissions for the user group and access the Channels area with them.

Please test and let me know if you have any issues!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
5 years 7 months ago #64500 by dlewintx
Partial progress was made but not quite there yet. When I added the code, CHANNEL MANAGEMENT did show up on the ACCESS OPTIONS, and I was able to set to ALLOWED for the specific user group. Then when logged in as a member of that group, I could now click on CHANNELS in the JFBConnect dashboard, and see the list of created channels. Prior to this code change I would have gotten this far and clicking on CHANNELS would have triggered an access error.

However, when I click on a CHANNEL to review/change settings, I get an ACCESS ERROR.

Shouldn't the permitted group be able to review channel information if it has channel management permissions?

dlewintx
The topic has been locked.
Support Specialist
5 years 7 months ago #64501 by alzander
Ahh... for now, add the singular version of channel as an access level as well, like:
<action name="jfbconnect.channel.manage" title="Channel Management" description="The user is able to manage channels"/>
The only thing different there is the name with jfbconnect.channel.manage instead of channels.

You'll need both.

Let us know if that gets you going. We'll add this to a future release with only one access level required, but adding both for you is the quickest solution.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
5 years 7 months ago #64504 by dlewintx
Happy to report that the changes did the trick. THANK YOU for the fast and detailed response.

I am now going to generate my screen capture for app review and approval. I let you know how it goes.

dlewintx
The topic has been locked.
Active Subscriptions:

None
5 years 7 months ago #64506 by dlewintx
I spoke too soon with previous post. Almost there. While I can now access the channel, it triggers an access error when trying to create a new channel. Specifically after select Facebook for the channel type.

I can access the channel page, and when I click on NEW, I get the form. I can enter a name and description, and I can select Facebook as the Channel provider, but as soon as I select Facebook, I get a "not authorized to access" error, and I cannot set the channel type.

It seems we are missing one more permission element. Please advise.

dlewintx

PS - The more general use case here is where I want to have a social media admin for the website and e-community, that would be managing the connections and post to social media platforms. However, they would not be SUPER USERS, and would have access restricted to only the social media controls. I have been able to do this with Joomla Access Groups, and I am almost there with this last exception.
The topic has been locked.
Support Specialist
5 years 7 months ago #64512 by alzander
You are correct :) Alright.. we just set a lower-tiered user up and went through the process of creating a channel. The above 2 access.xml lines are required along with one other change to allow our ajax requests to work to fetch the custom per-channel settings. I'm going to repeat it all here for conciseness, but you only need the last step.

In the access.xml file, add the following 2 actions:
<action name="jfbconnect.channel.manage" title="Channel Management" description="The user is able to manage channels"/>
        <action name="jfbconnect.channels.manage" title="Channels Management" description="The user is able to manage channels"/>

In the /administrator/components/com_jfbconnect/controller.php file, around line 35 is:
if ($viewName == '' || strtolower($viewName) == "jfbconnect" || strtolower($viewName) == "updates")
Update that to add a check for the ajax viewname, like:
if ($viewName == '' || strtolower($viewName) == "jfbconnect" || strtolower($viewName) == "updates" || strtolower($viewName) == 'ajax')
With that, finally, you should be good to go!

Please let me know if you run into anything else or have any other questions or issues!

Thanks,
Alex
The topic has been locked.