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

Read/Write/Execute access by specific user #99

Merged
merged 3 commits into from May 13, 2013

Conversation

@flozano
Copy link
Contributor

@flozano flozano commented May 12, 2013

Issue https://github.com/mizzy/serverspec/issues/96 in the original project.

I've changed be_readable, be_writable and be_executable to suppor the .by_user chain, so that we can test if a given user has explicit read/write/execute access for a given file/directory.

If this is accepted I will implement also for checking access for a specific group, following a slightly different approach however.

ret = run_command(commands.check_access_by_user(by_user, access, file))
ret[:exit_status] == 0
end

Copy link
Owner

@mizzy mizzy May 13, 2013

If this method is not defined, method_missing do the same thing.So you can omit this method.

@mizzy
Copy link
Owner

@mizzy mizzy commented May 13, 2013

Thanks a lot! I've added some comments to your commits.Please check it.

And could you add a test for commands.check_access_by_user to spec/*/commands_spec.rb for debian, darwin, gentoo, redhat and solaris, please?

…mmands, and add missing tests for command generation, as per code review on pull request
@flozano
Copy link
Contributor Author

@flozano flozano commented May 13, 2013

Hi!
Just added the missing command tests, reordered the parameters and removed the unneeded method (didn't know that ruby 'magic' :) )

@mizzy mizzy merged commit f60ebd3 into mizzy:master May 13, 2013
1 check passed
@flozano flozano deleted the read_access_by_user branch May 13, 2013
@flozano flozano restored the read_access_by_user branch May 13, 2013
@mizzy
Copy link
Owner

@mizzy mizzy commented May 13, 2013

Thanks! I've merged and released as v0.2.27.

@flozano flozano deleted the read_access_by_user branch May 13, 2013
@flozano
Copy link
Contributor Author

@flozano flozano commented May 13, 2013

Thanks for accepting the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants