Denis Marchand

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • in reply to: Cannot answer to myself #43295
    Denis Marchand
    Participant

    Problem solved by checking the following option in the Security tab :

    “Can user answer messages deleted by another user ?” (approximate translation from french).

    I was not aware of any message deletion since there was only one message in the thread : mine.

    Patrick

    in reply to: Cannot answer to myself #43293
    Denis Marchand
    Participant

    Hi again,

    If you tell me where I should look in the database in order to check whether I have been locked, there’s no problem. I’m a former system engineer, you can get technical.

    Patrick

    in reply to: Cannot answer to myself #43291
    Denis Marchand
    Participant

    This new problem also appeared in a thread posted to a group.

    Patrick

    in reply to: Cannot answer to myself #43288
    Denis Marchand
    Participant

    The problem suddenly appeared on another thread where I had already posted three time. Now, I can’t post any new message.See attached screen capture. The error message is in french and means : “You have not the permission to send an answer to this message”.

    Patrick

    Attachments:
    You must be logged in to view attached files.
    in reply to: Cannot answer to myself #43286
    Denis Marchand
    Participant

    Hi Shamim,

    > You can add yourself in whitelist group

    I did this already. No effect. I systematically get the error message when opening the message page.

    Patrick

    in reply to: Enabling non admins to create groups #42989
    Denis Marchand
    Participant

    Thanks Shamim,

    This appears to work correctly and I no longer need to hide some menus from non admins. I also removed the page edit capabilities from the author role and this didn’t seem to cause trouble.

    This is a simple approach : all the users who can post may manage the FEPM groups. This is not the same as controlling this with a custom capability but this is enough for me for the moment.

    Best regards.

    Patrick

    in reply to: Enabling non admins to create groups #42979
    Denis Marchand
    Participant

    Ooooops !

    I forgot to mention that you also have to give authors the capability to edit, delete and publish pages. It’s not needed for editors.

    Patrick

    in reply to: Enabling non admins to create groups #42977
    Denis Marchand
    Participant

    Hi Shamim,

    OK. I got it working but with some additional efforts. Here are the steps to follow. This can possibly help others…

    1. Create a custom capability. In my case manage_fepm_groups.

    2. Assign this capability to all roles you want to be able to manage groups without having access to the full FEPM management system.

    3. Add the following code to functions.php ::


    add_filter( 'register_post_type_args', function( $args, $post_type ){
    if( 'fep_group' == $post_type ){
    $args['show_in_menu'] = true;
    }
    return $args;
    }, 10, 2);

    add_filter( 'fep_admin_cap', function( $admin_cap ){
    return 'manage_fepm_groups';
    });

    4. Now all roles having the manage_fepm_groups capability (in my case admins, editors and authors) have 2 FEPM related menus in their dashboard : Front End PM Pro (full management options without the All Groups entry) and Groups (Group management). This obviously not what we want.

    5. Use an admin menu editor (I use Menu Editor) to make all the entries of the Front End PM PRO menu inaccessible to non admins. In Menu Editor this can be done by adding for each entry an additional extra capability that will be mandatory to access these menu entries. I entered manage_options in this field and saved the menu changes.

    After that, the Front End PM PRO menu disappeared for authors and editors but was still there for admins (who are keeping the All Groups menu anyway which is indispensable because it is no longer there in the Front End PM PRO menu). Authors and Editors are now able to manage groups.

    Well, I got what I wanted but this was a little bit awkward, to say the least 🙂 .

    Thanks anyway for putting me on the right track. But I think that the possibility to give access to group management to non admins should be built-in.

    Greeting from Fontainebleau, France.

    Patrick

    in reply to: Enabling non admins to create groups #42971
    Denis Marchand
    Participant

    Hi Shamim,

    I changed the code as suggested using a custom capability. Now, authors and editors do have access to the whole FEPM menu (as you said, this is risky) but admins no longer see the FEPM | All Groups menu.

    Not a satisfactory solution, I’m afraid.

    I’ll see if I can work out something that would allow editors and authors to only have access to the FEPM | All Groups menu.

    Patrick

    in reply to: Enabling non admins to create groups #42969
    Denis Marchand
    Participant

    Hi again,

    By the way, I have just noticed that users having the Editor role, do have the FEPM => All Groups menu in their dashboard. However, when clicking on All Groups, access is denied. So, it seems that giving access to All Groups to editors was anticipated but not really implemented.

    I didn’t see this before because I’m essentially working on the Author role. No user has the editor role for the moment (except a test account).

    Patrick

    in reply to: Enabling non admins to create groups #42965
    Denis Marchand
    Participant

    Hi Shamim,

    I have tried again and again to use the filter you mentioned above but each time a non admin user tries to access “edit.php?post_type=fep_group”, he’s blocked because he has not enough rights. The page itself is probably accessing other pieces of code requiring the manage_options capability.

    I could replace manage_options with another custom capability all over the code but the next update will overwrite these changes. Not a good solution.

    I think that you should consider making this configurable. Group Messaging is one of the main reasons for which we decided to switch to the Pro version. In its current state, if people involved in the site activity but who should not be admins and shouldn’t have the manage_options capability need to create an FEPM group, they have to ask an admin. This is not practical and I’m getting flak about that.

    My two cents.

    Patrick

    in reply to: Enabling non admins to create groups #42963
    Denis Marchand
    Participant

    Hi Shamim,

    Thanks for the code. However, I’m afraid this will not be enough.

    I have created a custom capability (manage_fepm_groups), gave it to the author role and used it in the code you provided. The FEPM menu doesn’t even appear in their dashboard.

    This can be fixed by giving the authors the ‘page’ capability but even then, the access to edit.php?post_type=fep_group is not allowed.

    I have seen that the manage_options capability is hard-coded everywhere in the code.So, I think that giving access to the All Groups page to authors and editors will require modifying this code directly. Something I don’t want to do for obvious reasons.

    Patrick

    in reply to: Enabling non admins to create groups #42939
    Denis Marchand
    Participant

    Hi Shamin,

    > 1. You can use register_post_type_args hook to change which capability we need to create groups. (If you need more instruction let me know)

    Yes, I would appreciate some guidance.

    > 3. I could not reproduce the issue where if we have 2 admins, one is hidden. Can you please re-test this?

    I have retested by adding a third admin and now I see all three. However, I should have mentioned that when I did the previous test, I had previously added and then deleted a new admin.

    Thanks for the quick answer.

    Patrick

    in reply to: Enabling non admins to create groups #42934
    Denis Marchand
    Participant

    Hi,

    OK. The “send message to “admin” thing is a bug. If I add only one new admin, it doesn’t appear as a possible choice. If I add a second one, the first one appears as a choice in the list but not the second and so on…

    Thanks in advance for fixing this.

    Patrick

    in reply to: Enabling non admins to create groups #42932
    Denis Marchand
    Participant

    Hi again,

    By the way, I have added a new FEPM admin abd authorized users to send messages to the admin(s), but when I click on New message from a user’s account, I see the “send message to admin checkbox” but I have no choice (as if the new admin was not registered).

    Patrick

Viewing 15 posts - 16 through 30 (of 30 total)