Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Add ability to ignore unlisted users #11

Closed

Conversation

schleyfox
Copy link

if you don't like that, send it right back

This allows gratan to be run on databases that have users managed in other ways by specifying an option that it should only attempt to drop users that are listed in some way in the Grantfile. This also adds an option in the dsl to specify users as dropped.

My use case is that I have a bunch of databases with users managed in various ways. I'd like to start managing some accounts with gratan (or something), but I'm not ready, willing, or able to think about managing all accounts in this way.

🎸👍💃

This allows gratan to be run on databases that have users managed in
other ways by specifying an option that it should only attempt to drop
users that are listed in some way in the Grantfile.  This also adds an
option in the dsl to specify users as dropped.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) when pulling 090b8ed on schleyfox:allow-unmanaged-user-accounts into 16f3a3a on winebarrel:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) when pulling e366238 on schleyfox:allow-unmanaged-user-accounts into 16f3a3a on winebarrel:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) when pulling 1859859 on schleyfox:allow-unmanaged-user-accounts into 16f3a3a on winebarrel:master.

@winebarrel
Copy link
Collaborator

Thank you for pull request!
I'm sorry for late reply...

@winebarrel
Copy link
Collaborator

I think this feature is too special. (not versatile)

Can following methods solve your problem?

  1. comment out
=begin
user 'scott', 'localhost', identified: 'tiger' do
  on '*.*' do
    grant 'SELECT'
  end
end
=end

#user 'scott', 'localhost', identified: 'tiger' do
#  on '*.*' do
#    grant 'SELECT'
#  end
#end
  1. unless statement
unless :dropped
user 'scott', 'localhost', identified: 'tiger' do
  on '*.*' do
    grant 'SELECT'
  end
end
end

@winebarrel winebarrel closed this Dec 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants