Skip to content

Commit

Permalink
Add team and organization invite unregistered user (#489)
Browse files Browse the repository at this point in the history
* Start adding team and organization invite unregistered user

* Lowercase email address when attempting to add user to team

* Add user invite to org add user endpoint

* Add team and org invite routes to UI

* update repo url for new invite emails post main merge

* Handle user invite for team and org on registration flow

* Add user invite management to organization and team pages

* Add notification for add user when user not found and invite sent
  • Loading branch information
StevenWeathers authored Mar 26, 2024
1 parent bac41b4 commit 86ad786
Show file tree
Hide file tree
Showing 31 changed files with 1,911 additions and 41 deletions.
344 changes: 344 additions & 0 deletions docs/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,94 @@ const docTemplate = `{
}
}
},
"/auth/invite/organization/{inviteId}": {
"get": {
"description": "Get a organization user invite details",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Get Organization Invite",
"parameters": [
{
"type": "string",
"description": "the invite ID",
"name": "inviteId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/http.standardJsonResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/thunderdome.OrganizationUserInvite"
}
}
}
}
]
}
}
}
}
},
"/auth/invite/team/{inviteId}": {
"get": {
"description": "Get a team user invite details",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Get Team Invite",
"parameters": [
{
"type": "string",
"description": "the invite ID",
"name": "inviteId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/http.standardJsonResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/thunderdome.TeamUserInvite"
}
}
}
}
]
}
}
}
}
},
"/auth/ldap": {
"post": {
"description": "attempts to log the user in with provided credentials\n*Endpoint only available when LDAP is enabled",
Expand Down Expand Up @@ -2664,6 +2752,108 @@ const docTemplate = `{
}
}
},
"/organizations/{orgId}/invites": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get a list of user invites associated to the team",
"produces": [
"application/json"
],
"tags": [
"organization"
],
"summary": "Get Team User Invites",
"parameters": [
{
"type": "string",
"description": "the org ID",
"name": "organizationId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/http.standardJsonResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/thunderdome.OrganizationUserInvite"
}
}
}
}
]
}
}
}
}
},
"/organizations/{orgId}/invites/{inviteId}": {
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Delete user invite from organization",
"produces": [
"application/json"
],
"tags": [
"organization"
],
"summary": "Delete Org User Invite",
"parameters": [
{
"type": "string",
"description": "organization id",
"name": "orgId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "invite id",
"name": "inviteId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
}
}
}
},
"/organizations/{orgId}/teams": {
"get": {
"security": [
Expand Down Expand Up @@ -4499,6 +4689,108 @@ const docTemplate = `{
}
}
},
"/teams/{teamId}/invites": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get a list of user invites associated to the team",
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Get Team User Invites",
"parameters": [
{
"type": "string",
"description": "the team ID",
"name": "teamId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/http.standardJsonResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/thunderdome.TeamUserInvite"
}
}
}
}
]
}
}
}
}
},
"/teams/{teamId}/invites/{inviteId}": {
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Delete a user invite from the team",
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Deletes Team User Invite",
"parameters": [
{
"type": "string",
"description": "the team ID",
"name": "teamId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "the user invite ID",
"name": "inviteId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
}
}
}
},
"/teams/{teamId}/retro-actions": {
"get": {
"security": [
Expand Down Expand Up @@ -7856,6 +8148,9 @@ const docTemplate = `{
"name": {
"type": "string"
},
"orgInviteId": {
"type": "string"
},
"password1": {
"type": "string",
"maxLength": 72,
Expand All @@ -7865,6 +8160,9 @@ const docTemplate = `{
"type": "string",
"maxLength": 72,
"minLength": 6
},
"teamInviteId": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -8171,6 +8469,29 @@ const docTemplate = `{
}
}
},
"thunderdome.OrganizationUserInvite": {
"type": "object",
"properties": {
"created_date": {
"type": "string"
},
"email": {
"type": "string"
},
"expire_date": {
"type": "string"
},
"invite_id": {
"type": "string"
},
"organization_id": {
"type": "string"
},
"role": {
"type": "string"
}
}
},
"thunderdome.Poker": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -8808,6 +9129,29 @@ const docTemplate = `{
}
}
},
"thunderdome.TeamUserInvite": {
"type": "object",
"properties": {
"created_date": {
"type": "string"
},
"email": {
"type": "string"
},
"expire_date": {
"type": "string"
},
"invite_id": {
"type": "string"
},
"role": {
"type": "string"
},
"team_id": {
"type": "string"
}
}
},
"thunderdome.User": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 86ad786

Please sign in to comment.