Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browse fails with users who have only column privileges for some columns #11922

Closed
ibennetch opened this issue Feb 6, 2016 · 7 comments
Closed
Assignees
Labels
Bug A problem or regression with an existing feature
Milestone

Comments

@ibennetch
Copy link
Member

Users who only have select privileges on some of the columns in a table are unable to browse.

Is this something we can fix?

SQL to make reproducing easier:

GRANT USAGE ON *.* TO 'col'@'%';

GRANT SELECT (name, id), INSERT (name, id), UPDATE (name, id), REFERENCES (name, id) ON `test`.`col` TO 'col'@'%';

and to create the table:

CREATE TABLE `col` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@ibennetch
Copy link
Member Author

@nijel nijel added the Bug A problem or regression with an existing feature label Feb 8, 2016
@madhuracj madhuracj self-assigned this Feb 10, 2016
@madhuracj
Copy link
Contributor

Given that only a very small fraction of users would have the problem, I am not sure checking column permission prior to generating the browse query is worth performance burden it adds to all the other users. Moreover, using a bookmark having the same name as the table with the appropriate browse query provides a workaround for this.

@madhuracj
Copy link
Contributor

For the reference default browse query is generated at https://github.com/phpmyadmin/phpmyadmin/blob/RELEASE_4_5_4/libraries/sql.lib.php#L868-L926

@madhuracj madhuracj removed their assignment Feb 11, 2016
@ibennetch ibennetch self-assigned this Feb 11, 2016
@ibennetch
Copy link
Member Author

I don't see a good solution to this.

I'm interested in the bookmark workaround you mentioned and think it's acceptable to just document this as a known issue.

@madhuracj madhuracj added this to the 4.5.5 milestone Feb 14, 2016
@madhuracj
Copy link
Contributor

Addressed by PR #11938

@freshcalendars
Copy link

You helped me solve a big problem. Thank you so much.

xoxo 😋

@Aboelfotoh83
Copy link

Aboelfotoh83 commented Nov 7, 2019

Thank you for this solution.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants