Add custom permissions

Created on 20 February 2023, over 1 year ago
Updated 26 February 2023, over 1 year ago

In current state are permissions for use 'authenticated' for Search form and Administer site configuration for config form. I think, that this module will need custom permissions.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇿Czech Republic siva01

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @siva01
  • @siva01 opened merge request.
  • 🇮🇳India anup.sinha Bengaluru

    Hi @siva01, First of all many thanks for checking out my module.

    I wanted to keep the configuration as simple as possible. Below are the explanation for my permission -

    1. I would not want to give access to the API config page anyone except site administrator as it has the secret access token.
    2. For a blog or forum site, authenticated users also need to have the access to the content creation page.

    Now if we add custom permission, people also need to check permissions for different role like authenticated users from the permissions page to make this module work which will overcomplicate the configuration part as per my opinion.

    So request you to provide more explanation or a scenario when we need a custom permission for this module. This will help me to analyse your requirement.

    Thanks & Regards,
    Anup

  • 🇨🇿Czech Republic siva01

    I added separated permissions for configuration and usage. You can check my MR on https://git.drupalcode.org/project/chatgpt_plugin/-/merge_requests/8

  • 🇮🇳India anup.sinha Bengaluru

    Hi @siva01, I already checked your merge request. As per your merge request, "use chatgpt search form" permission will allow users to use the ChatGPT search form. By default for all the custom permissions, it will be checked for the admin roles in permission page. So for your custom "use chatgpt search form" permission still admin users need to go to the permission page and need to check it for authenticated users. Otherwise authenticated users will not be able to access it and that is why I said that it will overcomplicate the configuration part.

    Thanks & Regards,
    Anup

  • 🇮🇳India anup.sinha Bengaluru

    Hi @siva01, many thanks for this change request and working on it. I have found lot of scenarios where we don't need this chatgpt api call access to authenticated users. So you are absolutely right that we need custom permission to manage the access efficiently. So I will review your change request and will merge it.

    Thanks & Regards,
    Anup

  • Status changed to Fixed over 1 year ago
  • 🇮🇳India anup.sinha Bengaluru

    Hi @siva01, your changes have been incorporated now into the dev branch by doing little bit of text changes. Thanks again for suggesting this change. Really appreciate your efforts.

    Thanks & Regards,
    Anup

  • Status changed to Fixed over 1 year ago
  • 🇮🇳India anup.sinha Bengaluru
  • 🇩🇰Denmark ressa Copenhagen

    Thanks @siva01 and @anup.sinha. It does look like 'Welcome to the ChatGPT' got re-reverted again, and is now back :)

    https://git.drupalcode.org/project/chatgpt_plugin/-/blob/1.0.x/chatgpt_p...

  • 🇩🇰Denmark ressa Copenhagen

    Also, I get this error with the latest dev-version:

    The service "chatgpt.subscriber" has a dependency on a non-existent service "content_translation.manager".  
    
  • 🇮🇳India anup.sinha Bengaluru

    Hi @ressa, I will keep this in mind going forward. Also dev branch is in active development state, so apology for the issue. Now it has been fixed , please try again.

    Also added two new features -

    1. Content translation -> if you go to the content translate tab, you will see a chatgpt translation link for simple text content translation.
    2. OpenAI assistance tool -> in admin section, you will see a link for OpenAI Assistance Tool where you will be able to generate images from text using DALL.E model.

    Request you to validate this new feature and share your feedback.

    Thanks,
    Anup

  • 🇩🇰Denmark ressa Copenhagen

    Thanks @anup.sinha for clearing that up. I was a bit too fast, sorry about that.

    the module now installs fine after your update. It does make sense that the module is under heavy development, and occasionally in flux between states. Thanks for the great work, I am very grateful for it.

    It's very cool with the two new features! I will try them out as soon as I have time. Maybe the "OpenAI Assistance Tool" should be placed under /admin/content/ since it's actually generating content?

    PS. The "OpenAI Assistance Tool Add to Default shortcuts" button is named "Search" :)

Production build 0.69.0 2024