Menu

#657 (ok 4.5) Alter privileges when renaming database/table/fields

Needs_decision
resolved
Normal
2015-05-20
2004-12-22
tomasz
No

I was wondering if you could add a checkbox when
renaming which would deal with realigning privileges in
the mysql database, when renaming. (or at least add to
the success message a reminder about updating
privilieges.) thanks.
t.

Discussion

  • Michal Čihař

    Michal Čihař - 2004-12-28
    • summary: concerning renaming database/table/fields --> Alter privileges when renaming database/table/fields
     
  • Isaac Bennetch

    Isaac Bennetch - 2014-11-16
    • labels: Data insertion/extraction/manipulation --> Data insertion/extraction/manipulation, gsoc
    • assigned_to: Isaac Bennetch
    • Group: --> Needs_decision
     
  • Deven Bansod

    Deven Bansod - 2015-05-01

    Hi,

    Should we include this 'Realign Privileges' Option for both Renaming as well as Copying the Database ?

     
  • Isaac Bennetch

    Isaac Bennetch - 2015-05-01

    Yes, I think that is a good idea.

     
  • Deven Bansod

    Deven Bansod - 2015-05-08

    Hi, I had started working on this but had some questions.

    If one is renaming a database and selects the 'Realign Privileges' Option,
    1. should only the database specific privileges change or
    2. should the privileges relating to tables, columns in the tables, procedures inside the selected database be realigned too ?

    As of now, I have implemented the second approach for 'Database Copy/ Rename'.
    PR : https://github.com/phpmyadmin/phpmyadmin/pull/1664

    Copying renaming tables, fields etc. remains.

     
    • Isaac Bennetch

      Isaac Bennetch - 2015-05-08

      Which do you think is the better approach?

      I think the second option is better here, it makes sense to me that when renaming that a user would want all those other parts realigned as well.

       
  • Deven Bansod

    Deven Bansod - 2015-05-08

    Hi,

    Thanks. I too think that the second one is better because that creates a more extensive copy of the database which the user might be looking for.

    I will implement it for table in a few days.
    Table realign privileges will be included in :
    1. Renaming using table options.
    2. Move Table to (database.table)
    3. Copy Table to (database.table)

    Also, I had a few doubts regarding the column renaming mentioned in the ticket summary. I am thinking of implementing the privilege realign of column renaming in the way shown in the attachment.

    Please comment with the changes if possible.

     
  • Isaac Bennetch

    Isaac Bennetch - 2015-05-19
    • labels: Data insertion/extraction/manipulation, gsoc --> Data insertion/extraction/manipulation, GSoC 2015
    • summary: Alter privileges when renaming database/table/fields --> (ok 4.5) Alter privileges when renaming database/table/fields
    • status: open --> resolved
     
  • Olaf van der Spek

    I had no idea what "Realign Privileges" was.. Can't this be explained on the same page it's used?

     
    • Isaac Bennetch

      Isaac Bennetch - 2015-05-20

      I've spent several days thinking of a more descriptive short text than "Realign privileges" but haven't yet thought of anything better. Suggestions are welcome.

      I think a tooltip when hovering over the text can also help in this case to explain what this feature does.

       
      • Marc Delisle

        Marc Delisle - 2015-05-20

        What about "Adjust privileges" ?

         
        • Deven Bansod

          Deven Bansod - 2015-05-21

          Hi Marc,

          I think "Adjust Privileges" would make more sense to the user than "Realign Privileges". Thanks for the suggestion.

          I would want someone else to feel "Adjust" is better than "Realign", too and I would go on and make the necessary changes.

           
          • Madhura Jayaratne

            "Adjust Privileges" sounds better. What would even be better is a link to a page in phpMyAdmin documentation which describes what this functionality does.

             
            • Deven Bansod

              Deven Bansod - 2015-05-21

              Hi Madhura,

              This seems a good idea. Thanks for the suggestion.
              Anyways, I was thinking of including the explanation of this feature under FAQ 6.6 - Using phpMyAdmin.

              Would you suggest a better place to include the explanation of this feature ?

               
  • Deven Bansod

    Deven Bansod - 2015-05-20

    Hi, I think we can add a 'title' attribute to the label 'Realign Privileges' saying something like (suggestions welcome here) 'The Privileges currently assigned to this database will be appropriately realigned after copying'.

    And database can be exchanged with table/column/procedure and copying with moving/renaming appropriately chosen at proper places.

    Will this be okay ? Or can you please suggest anything ?

     
  • Olaf van der Spek

    Sounds okay.
    Though I'm not sure it should be done by default, I'm not a fan of touching privileges implicitly / by accident.