lib/open_project/gitolite/gitolite_wrapper/permission_builder.rb
# Turn the internal hash into the gitolite
# accepted format
Turn the internal hash into the gitolite
accepted format
Turn the internal hash into the gitolite accepted format
def convert_to_gitolite_format
      @all_rewind_identifiers = @rewind + @rewind_deploy
      @all_read_identifiers = @read + @read_deploy
      permissions = {}
      permissions['RW+'] = { '' => @all_rewind_identifiers.uniq.sort } unless @all_rewind_identifiers.empty?
      permissions['RW'] = { '' => @write.uniq.sort } unless @write.empty?
      permissions['R'] = { '' => @all_read_identifiers.uniq.sort } unless @all_read_identifiers.empty?
      [permissions]
    end
def convert_to_gitolite_format @all_rewind_identifiers = @rewind + @rewind_deploy @all_read_identifiers = @read + @read_deploy permissions = { } permissions [ 'RW+' ] = { '' => @all_rewind_identifiers . uniq . sort } unless @all_rewind_identifiers . empty? permissions [ 'RW' ] = { '' => @write . uniq . sort } unless @write . empty? permissions [ 'R' ] = { '' => @all_read_identifiers . uniq . sort } unless @all_read_identifiers . empty? [ permissions ] end
Turn the internal hash into the gitolite
accepted format
Turn the internal hash into the gitolite accepted format