Last active
June 28, 2018 07:45
-
-
Save resool/40468f20b862e360f1906f470dfb46eb to your computer and use it in GitHub Desktop.
Unfortunately there is no shortcut here, you have to revoke access for the whole table and then grant a SELECT privilege on each column except sensitive ones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- revoke select access on encrypted_password and reset_password_token | |
BEGIN; | |
REVOKE SELECT ON admin_users FROM blazer; | |
GRANT SELECT ( | |
email, reset_password_sent_at, remember_created_at, admin, deactivated_at, name, created_at, updated_at | |
) ON users TO blazer; | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment