lib/rally_user_helper.rb
def create_project_permission(user, project, permission)
    # Keep backward compatibility of our old permission names
      if permission == USER
        permission = EDITOR
      end

      if permission != NOACCESS
        this_workspace = project["Workspace"]
        new_permission_obj = {}
        new_permission_obj["Workspace"] = this_workspace["_ref"]
        new_permission_obj["Project"] = project["_ref"]
        new_permission_obj["User"] = user._ref
        new_permission_obj["Role"] = permission

        if @create_flag then new_permission = @rally.create(:projectpermission, new_permission_obj) end
      end
    end
# Create User or Viewer permissions for a Project
Create User or Viewer permissions for a Project
Create User or Viewer permissions for a Project
def create_project_permission(user, project, permission)
      if permission == USER
        permission = EDITOR
      end
      if permission != NOACCESS
        this_workspace = project["Workspace"]
        new_permission_obj = {}
        new_permission_obj["Workspace"] = this_workspace["_ref"]
        new_permission_obj["Project"] = project["_ref"]
        new_permission_obj["User"] = user._ref
        new_permission_obj["Role"] = permission
        if @create_flag then new_permission = @rally.create(:projectpermission, new_permission_obj) end
      end
    end
def create_project_permission ( user , project , permission ) if permission == USER permission = EDITOR end if permission != NOACCESS this_workspace = project [ "Workspace" ] new_permission_obj = { } new_permission_obj [ "Workspace" ] = this_workspace [ "_ref" ] new_permission_obj [ "Project" ] = project [ "_ref" ] new_permission_obj [ "User" ] = user . _ref new_permission_obj [ "Role" ] = permission if @create_flag then new_permission = @rally . create ( :projectpermission , new_permission_obj ) end end end
Create User or Viewer permissions for a Project
Create User or Viewer permissions for a Project
# Keep backward compatibility of our old permission names
user
project
permission