Sha256: 995162a84723b777c73a860d328dbe55bfa349df1aa2bc71ba637f1341e3a0dc
Contents?: true
Size: 425 Bytes
Versions: 6
Compression:
Stored size: 425 Bytes
Contents
project_name = read_project_name authorize(project_name, 'admin') dir = find_project_dir(project_name) username = ARGV.shift action = ARGV.shift unless ['admin','write','read'].member?(action) $stderr.puts "Not a valid action (must be one of: read, write, admin)" exit 1 end File.open(File.join(dir, ".permissions"), "r+") do |f| f.flock(File::LOCK_EX) contents = f.read puts contents f.flock(File::LOCK_UN) end
Version data entries
6 entries across 6 versions & 1 rubygems