| 285 | |
| 286 | === Projects === |
| 287 | |
| 288 | A Project is an administrative grouping of users that helps to scale testbed administration by allowing trusted users to add others to the testbed. Intuitively, a project collects users who are working on a particular research project. A user proposes such a project to the testbed administration. If the administration approves that project, the proposing user is granted the power to add other users to the project. Until a user is a member of an approved project, they have minimal rights on the testbed. |
| 289 | |
| 290 | To make the distinction above explicit, projects can be in 2 states: ''approved'' and ''unapproved''. All projects are initially unapproved. Members of unapproved projects gain no additional rights on the testbed. Once an administrator approves the project, the members gain broader rights. Approval is an explicit operation undertaken only in accordance with the testbed's real-world policies. |
| 291 | |
| 292 | As users have userids, projects have `projectid`s. A projectid is a text string that uniquely identifies a project. It cannot contain a colon, nor can it conflict with either another projectid or userid. |
| 293 | |
| 294 | An approved project creates its own namespace for circles, experiments, and libraries in much the same way creating a [wiki:SPIDocs#Users user] does. Users can be explicitly given the right to create circles, experiments, and libraries in the project's namespace. The SPI places no meaning on an instance created with a user name prefix rather than a project name prefix, but applications may. |
| 295 | |
| 296 | A project also is linked to a [wiki:SPIDocs#Circles circle] named after the project. A project named `myproject` will have a linked circle `myproject:myproject`. The system keeps the membership of that circle and the project synchronized. By assigning rights to that circle, users can assign rights to all project members. |
| 297 | |
| 298 | The operations on projects are controlled by the `Projects` [wikiSPIDocs#Services service]. |
| 299 | |
| 300 | When a researcher joins the testbed by [wiki:SPIDocs#CreatingNewUsers creating a user instance], one of the few operations the testbed will allow them to carry out is to propose a project. The intended workflow is that a researcher comes to the testbed, joins it by creating a user instance and then gains rights by proposing a project that is approved. Then that user (and other users to which it delegates rights) can administer access under that project. |
| 301 | |
| 302 | ==== Project Permissions ==== |
| 303 | |
| 304 | Any member of a project may have one or more of the following permissions that define the operations that user can carry ont on the project itself. The permissions are: |
| 305 | |
| 306 | ||= Permission Name =||= Meaning =|| |
| 307 | || ADD_USER || Request that a user be added to the project or confirm a request by a user to join the project || |
| 308 | || CREATE_CIRCLE ||Create a new circle in the project's namespace (a name prepended by ''projectid'':)|| |
| 309 | || CREATE_EXPERIMENT ||Create a new experiment in the project's namespace (a name prepended by ''projectid'':) || |
| 310 | || CREATE_LIBRARY || Create a new library in the project's namespace (a name prepended by ''projectid'':) || |
| 311 | || REMOVE_USER || Remove a user from the project. Any objects they have created in the project's namespace remain || |
| 312 | |
| 313 | |
| 314 | ==== Creating A Project ==== |
| 315 | |
| 316 | A user creates a project using the `createProject` operation on the `Projects` [wiki:SPIDocs#Services service]. Mechanically, the procedure to create a project is very similar to [wiki:SPIDocs#CreatingNewUsers creating a user]. An application will: |
| 317 | |
| 318 | * User the `getProfileDescription` operation on the `Projects` service to get an empty project profile |
| 319 | * Gather data from the user to fill in the project description, including non-optional fields and proper formatting |
| 320 | * Call the `createProject` with a project name from the user and that user as the project's owner. (Administrators can create projects owned by other users). |
| 321 | |
| 322 | When `createProject` completes successfully, the project exists but is unapproved. An administrator can approve it by calling `approveProject` in the `Projects` service once the testbed's real-world criteria are met. An administrator may also call `removeProject` in the `Projects` service to remove an unapproved project. (`removeProject` also will remove approved projects, potentially removing many users' rights to operate on the testbed.) |
| 323 | |
| 324 | ==== Adding Users To A Project ==== |
| 325 | |
| 326 | Users can become members of a project by requesting to join or or by being invited to join. Because joining a project adds a user to the project's circle, that changes the rights of a user, so either of these routes must be endorsed by both the user and someone with relevant permissions in the project. The difference is only the order in which the endorsements are gathered. |
| 327 | |
| 328 | When a user finds a project the would like to join, usually through some out of band mechanism, they call the `joinProject` operation on the `Projects [wiki:SPIDocs#Services service]. This registers the user's intention to join and sends a [wiki:SPIDocs#Notifications notification] to members of the project who have the right to add users to the group. This notification includes a challenge that is similar in format to the [wiki:SPIDocs#PasswordManagement requestPasswordChange] challenge. As with that operation, an application can include a URL prefix that will be prepended to the challenge in the notification. |
| 329 | |
| 330 | One of the users receiving the notification can then call `joinProjectConfirm` with the challenge and a list of [wiki:SPIDocs#ProjectPermissions permissions] that the user will be assigned. When that operation completes, the user is a member of the project with the associated rights. The user calling `joinProjectConfirm` must have the `ADD_USER` right and similarly cannot confer more rights than they have. |
| 331 | |
| 332 | When a user with the `ADD_USER` permission wants to invite another user to join the project, the inviting user calls the `addUsers` operation with the projectid, a list of users, proposed permissions, and an a URL prefix that serves the same purpose as the prefix on `joinProject`. When the operation succeeds, each invited user receives a [wiki:SPIDocs#Notifications notification] containing a challenge (and descriptive text about the project). If the invited user does wish to join, they call the `addUserConfirm` operation with the challenge. When that operation succeeds, they are a member of the project. |
| 333 | |