Skip to content

Commit

Permalink
v0.4.44
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Feb 14, 2025
1 parent bb63a2e commit 3178b2c
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 108 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

## Introduction

> Version: **2412.1.32**
> Version: **2412.1.33**
>
> Date: **February 11, 2025**
> Date: **February 14, 2025**
---

Expand Down
21 changes: 0 additions & 21 deletions doc/controllers/orgs-admins.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,30 +313,9 @@ adminId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")

body := models.Admin{
Email: models.ToPointer("jsnow@abc.com"),
ExpireTime: models.ToPointer(0),
FirstName: models.ToPointer("John"),
Hours: models.ToPointer(24),
LastName: models.ToPointer("Sno"),
Phone: models.ToPointer("string"),
Phone2: models.ToPointer("string"),
Privileges: []models.AdminPrivilege{
models.AdminPrivilege{
MspId: models.ToPointer(uuid.MustParse("c0cf23fc-d82f-4219-988c-82fb61d8c875")),
Name: models.ToPointer("string"),
OrgId: models.ToPointer(uuid.MustParse("a40f5d1f-d889-42e9-94ea-b9b33585fc6b")),
OrgName: models.ToPointer("string"),
OrggroupIds: []uuid.UUID{
uuid.MustParse("497f6eca-6276-4993-bfeb-53d5bbba6f08"),
},
Role: models.AdminPrivilegeRoleEnum_ADMIN,
Scope: models.AdminPrivilegeScopeEnum_ORG,
SiteId: models.ToPointer(uuid.MustParse("72771e6a-6f5e-4de4-a5b9-1266c4197811")),
SitegroupIds: []uuid.UUID{
uuid.MustParse("497f6eca-6276-4993-bfeb-53d6bbba6f08"),
},
Views: models.ToPointer(models.AdminPrivilegeViewEnum_SWITCHADMIN),
},
},
}

apiResponse, err := orgsAdmins.UpdateOrgAdmin(ctx, orgId, adminId, &body)
Expand Down
15 changes: 0 additions & 15 deletions doc/models/admin-privilege-view-enum.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@

# Admin Privilege View Enum

Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users.
You can define custom roles by adding the `views` attribute along with `role` when assigning privileges.
Below are the list of supported UI views. Note that this is UI only feature.

| UI View | Required Role | Description |
| --- | --- | --- |
| `reporting` | `read` | full access to all analytics tools |
| `marketing` | `read` | can view analytics and location maps |
| `super_observer` | `read` | can view all the organization except the subscription page |
| `location` | `write` | can view and manage location maps, can view analytics |
| `security` | `write` | can view and manage site labels, policies and security |
| `switch_admin` | `helpdesk` | can view and manage Switch ports, can view wired clients |
| `mxedge_admin` | `admin` | can view and manage Mist edges and Mist tunnels |
| `lobby_admin` | `admin` | full access to Org and Site Pre-shared keys |

## Enumeration

`AdminPrivilegeViewEnum`
Expand Down
2 changes: 1 addition & 1 deletion doc/models/admin-privilege.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Privilieges settings
| `Scope` | [`models.AdminPrivilegeScopeEnum`](../../doc/models/admin-privilege-scope-enum.md) | Required | enum: `msp`, `org`, `orggroup`, `site`, `sitegroup` |
| `SiteId` | `*uuid.UUID` | Optional | Required if `scope`==`site` |
| `SitegroupIds` | `[]uuid.UUID` | Optional | - |
| `Views` | [`*models.AdminPrivilegeViewEnum`](../../doc/models/admin-privilege-view-enum.md) | Optional | Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. <br>You can define custom roles by adding the `views` attribute along with `role` when assigning privileges. <br>Below are the list of supported UI views. Note that this is UI only feature.<br><br>\| UI View \| Required Role \| Description \|<br>\| --- \| --- \| --- \|<br>\| `reporting` \| `read` \| full access to all analytics tools \|<br>\| `marketing` \| `read` \| can view analytics and location maps \|<br>\| `super_observer` \| `read` \| can view all the organization except the subscription page \|<br>\| `location` \| `write` \| can view and manage location maps, can view analytics \|<br>\| `security` \| `write` \| can view and manage site labels, policies and security \|<br>\| `switch_admin` \| `helpdesk` \| can view and manage Switch ports, can view wired clients \|<br>\| `mxedge_admin` \| `admin` \| can view and manage Mist edges and Mist tunnels \|<br>\| `lobby_admin` \| `admin` \| full access to Org and Site Pre-shared keys \| |
| `Views` | [`[]models.AdminPrivilegeViewEnum`](../../doc/models/admin-privilege-view-enum.md) | Optional | Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. <br>You can define custom roles by adding the `views` attribute along with `role` when assigning privileges. <br>Below are the list of supported UI views. Note that this is UI only feature.<br><br>\| UI View \| Required Role \| Description \|<br>\| --- \| --- \| --- \|<br>\| `reporting` \| `read` \| full access to all analytics tools \|<br>\| `marketing` \| `read` \| can view analytics and location maps \|<br>\| `super_observer` \| `read` \| can view all the organization except the subscription page \|<br>\| `location` \| `write` \| can view and manage location maps, can view analytics \|<br>\| `security` \| `write` \| can view and manage site labels, policies and security \|<br>\| `switch_admin` \| `helpdesk` \| can view and manage Switch ports, can view wired clients \|<br>\| `mxedge_admin` \| `admin` \| can view and manage Mist edges and Mist tunnels \|<br>\| `lobby_admin` \| `admin` \| full access to Org and Site Pre-shared keys \| |
| `AdditionalProperties` | `map[string]interface{}` | Optional | - |

## Example (as JSON)
Expand Down
2 changes: 1 addition & 1 deletion doc/models/gateway-port-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gateway port config
| `Networks` | `[]string` | Optional | If `usage`==`lan`, name of the [networks]($h/Orgs%20Networks/_overview) to attach to the interface |
| `OuterVlanId` | `*int` | Optional | For Q-in-Q |
| `PoeDisabled` | `*bool` | Optional | **Default**: `false` |
| `PortNetwork` | `*string` | Optional | Only for SRX and if `usage`==`lan`, the Untagged VLAN Network |
| `PortNetwork` | `*string` | Optional | Only for SRX and if `usage`==`lan`, the name of the Network to be used as the Untagged VLAN |
| `PreserveDscp` | `*bool` | Optional | Whether to preserve dscp when sending traffic over VPN (SSR-only)<br>**Default**: `true` |
| `Redundant` | `*bool` | Optional | If HA mode |
| `RethIdx` | `*int` | Optional | If HA mode |
Expand Down
8 changes: 6 additions & 2 deletions doc/models/privilege-msp.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Privilieges settings
| `OrggroupId` | `*uuid.UUID` | Optional | If `scope`==`orggroup` |
| `Role` | [`models.PrivilegeMspRoleEnum`](../../doc/models/privilege-msp-role-enum.md) | Required | access permissions. enum: `admin`, `helpdesk`, `installer`, `read`, `write` |
| `Scope` | [`models.PrivilegeMspScopeEnum`](../../doc/models/privilege-msp-scope-enum.md) | Required | enum: `msp`, `org`, `orggroup` |
| `Views` | [`*models.AdminPrivilegeViewEnum`](../../doc/models/admin-privilege-view-enum.md) | Optional | Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. <br>You can define custom roles by adding the `views` attribute along with `role` when assigning privileges. <br>Below are the list of supported UI views. Note that this is UI only feature.<br><br>\| UI View \| Required Role \| Description \|<br>\| --- \| --- \| --- \|<br>\| `reporting` \| `read` \| full access to all analytics tools \|<br>\| `marketing` \| `read` \| can view analytics and location maps \|<br>\| `super_observer` \| `read` \| can view all the organization except the subscription page \|<br>\| `location` \| `write` \| can view and manage location maps, can view analytics \|<br>\| `security` \| `write` \| can view and manage site labels, policies and security \|<br>\| `switch_admin` \| `helpdesk` \| can view and manage Switch ports, can view wired clients \|<br>\| `mxedge_admin` \| `admin` \| can view and manage Mist edges and Mist tunnels \|<br>\| `lobby_admin` \| `admin` \| full access to Org and Site Pre-shared keys \| |
| `Views` | [`[]models.AdminPrivilegeViewEnum`](../../doc/models/admin-privilege-view-enum.md) | Optional | Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. <br>You can define custom roles by adding the `views` attribute along with `role` when assigning privileges. <br>Below are the list of supported UI views. Note that this is UI only feature.<br><br>\| UI View \| Required Role \| Description \|<br>\| --- \| --- \| --- \|<br>\| `reporting` \| `read` \| full access to all analytics tools \|<br>\| `marketing` \| `read` \| can view analytics and location maps \|<br>\| `super_observer` \| `read` \| can view all the organization except the subscription page \|<br>\| `location` \| `write` \| can view and manage location maps, can view analytics \|<br>\| `security` \| `write` \| can view and manage site labels, policies and security \|<br>\| `switch_admin` \| `helpdesk` \| can view and manage Switch ports, can view wired clients \|<br>\| `mxedge_admin` \| `admin` \| can view and manage Mist edges and Mist tunnels \|<br>\| `lobby_admin` \| `admin` \| full access to Org and Site Pre-shared keys \| |
| `AdditionalProperties` | `map[string]interface{}` | Optional | - |

## Example (as JSON)
Expand All @@ -30,7 +30,11 @@ Privilieges settings
"orggroup_id": "00000716-0000-0000-0000-000000000000",
"role": "helpdesk",
"scope": "org",
"views": "super_observer",
"views": [
"switch_admin",
"lobby_admin",
"location"
],
"exampleAdditionalProperty": {
"key1": "val1",
"key2": "val2"
Expand Down
6 changes: 4 additions & 2 deletions doc/models/privilege-org.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Privilieges settings
| `Scope` | [`models.PrivilegeOrgScopeEnum`](../../doc/models/privilege-org-scope-enum.md) | Required | enum: `org`, `site`, `sitegroup` |
| `SiteId` | `*uuid.UUID` | Optional | If `scope`==`site` |
| `SitegroupId` | `*uuid.UUID` | Optional | If `scope`==`sitegroup` |
| `Views` | [`*models.AdminPrivilegeViewEnum`](../../doc/models/admin-privilege-view-enum.md) | Optional | Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. <br>You can define custom roles by adding the `views` attribute along with `role` when assigning privileges. <br>Below are the list of supported UI views. Note that this is UI only feature.<br><br>\| UI View \| Required Role \| Description \|<br>\| --- \| --- \| --- \|<br>\| `reporting` \| `read` \| full access to all analytics tools \|<br>\| `marketing` \| `read` \| can view analytics and location maps \|<br>\| `super_observer` \| `read` \| can view all the organization except the subscription page \|<br>\| `location` \| `write` \| can view and manage location maps, can view analytics \|<br>\| `security` \| `write` \| can view and manage site labels, policies and security \|<br>\| `switch_admin` \| `helpdesk` \| can view and manage Switch ports, can view wired clients \|<br>\| `mxedge_admin` \| `admin` \| can view and manage Mist edges and Mist tunnels \|<br>\| `lobby_admin` \| `admin` \| full access to Org and Site Pre-shared keys \| |
| `Views` | [`[]models.AdminPrivilegeViewEnum`](../../doc/models/admin-privilege-view-enum.md) | Optional | Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. <br>You can define custom roles by adding the `views` attribute along with `role` when assigning privileges. <br>Below are the list of supported UI views. Note that this is UI only feature.<br><br>\| UI View \| Required Role \| Description \|<br>\| --- \| --- \| --- \|<br>\| `reporting` \| `read` \| full access to all analytics tools \|<br>\| `marketing` \| `read` \| can view analytics and location maps \|<br>\| `super_observer` \| `read` \| can view all the organization except the subscription page \|<br>\| `location` \| `write` \| can view and manage location maps, can view analytics \|<br>\| `security` \| `write` \| can view and manage site labels, policies and security \|<br>\| `switch_admin` \| `helpdesk` \| can view and manage Switch ports, can view wired clients \|<br>\| `mxedge_admin` \| `admin` \| can view and manage Mist edges and Mist tunnels \|<br>\| `lobby_admin` \| `admin` \| full access to Org and Site Pre-shared keys \| |
| `AdditionalProperties` | `map[string]interface{}` | Optional | - |

## Example (as JSON)
Expand All @@ -30,7 +30,9 @@ Privilieges settings
"scope": "sitegroup",
"site_id": "0000169c-0000-0000-0000-000000000000",
"sitegroup_id": "00002114-0000-0000-0000-000000000000",
"views": "lobby_admin",
"views": [
"location"
],
"exampleAdditionalProperty": {
"key1": "val1",
"key2": "val2"
Expand Down
6 changes: 5 additions & 1 deletion doc/models/sso-role-msp.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ SSO Role response
"orggroup_id": "000010e2-0000-0000-0000-000000000000",
"role": "admin",
"scope": "org",
"views": "super_observer",
"views": [
"location",
"lobby_admin",
"switch_admin"
],
"exampleAdditionalProperty": {
"key1": "val1",
"key2": "val2"
Expand Down
6 changes: 5 additions & 1 deletion doc/models/sso-role-org.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ SSO Role response
"scope": "site",
"site_id": "00002366-0000-0000-0000-000000000000",
"sitegroup_id": "000006ce-0000-0000-0000-000000000000",
"views": "super_observer",
"views": [
"location",
"lobby_admin",
"switch_admin"
],
"exampleAdditionalProperty": {
"key1": "val1",
"key2": "val2"
Expand Down
2 changes: 1 addition & 1 deletion mistapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func NewClient(configuration Configuration) ClientInterface {
configuration: configuration,
}

client.userAgent = utilities.UpdateUserAgent("SDK 2412.1.32")
client.userAgent = utilities.UpdateUserAgent("SDK 2412.1.33")
client.callBuilderFactory = callBuilderHandler(
func(server string) string {
if server == "" {
Expand Down
30 changes: 15 additions & 15 deletions mistapi/models/admin_privilege.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ import (
// Privilieges settings
type AdminPrivilege struct {
// Required if `scope`==`msp`
MspId *uuid.UUID `json:"msp_id,omitempty"`
MspId *uuid.UUID `json:"msp_id,omitempty"`
// Logo of the MSP (if the MSP belongs to an Advanced tier)
MspLogoUrl *string `json:"msp_logo_url,omitempty"`
MspLogoUrl *string `json:"msp_logo_url,omitempty"`
// Name of the MSP (if the org belongs to an MSP)
MspName Optional[string] `json:"msp_name"`
MspName Optional[string] `json:"msp_name"`
// Custom url of the MSP (if the MSP belongs to an Advanced tier)
MspUrl *string `json:"msp_url,omitempty"`
MspUrl *string `json:"msp_url,omitempty"`
// Name of the org/site/MSP depending on object scope
Name *string `json:"name,omitempty"`
Name *string `json:"name,omitempty"`
// Required if `scope`==`org`
OrgId *uuid.UUID `json:"org_id,omitempty"`
OrgId *uuid.UUID `json:"org_id,omitempty"`
// Name of the org (for a site belonging to org)
OrgName *string `json:"org_name,omitempty"`
OrgName *string `json:"org_name,omitempty"`
// If `scope`==`orggroup`
OrggroupIds []uuid.UUID `json:"orggroup_ids,omitempty"`
OrggroupIds []uuid.UUID `json:"orggroup_ids,omitempty"`
// access permissions. enum: `admin`, `helpdesk`, `installer`, `read`, `write`
Role AdminPrivilegeRoleEnum `json:"role"`
Role AdminPrivilegeRoleEnum `json:"role"`
// enum: `msp`, `org`, `orggroup`, `site`, `sitegroup`
Scope AdminPrivilegeScopeEnum `json:"scope"`
Scope AdminPrivilegeScopeEnum `json:"scope"`
// Required if `scope`==`site`
SiteId *uuid.UUID `json:"site_id,omitempty"`
SitegroupIds []uuid.UUID `json:"sitegroup_ids,omitempty"`
SiteId *uuid.UUID `json:"site_id,omitempty"`
SitegroupIds []uuid.UUID `json:"sitegroup_ids,omitempty"`
// Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users.
// You can define custom roles by adding the `views` attribute along with `role` when assigning privileges.
// Below are the list of supported UI views. Note that this is UI only feature.
Expand All @@ -47,8 +47,8 @@ type AdminPrivilege struct {
// | `switch_admin` | `helpdesk` | can view and manage Switch ports, can view wired clients |
// | `mxedge_admin` | `admin` | can view and manage Mist edges and Mist tunnels |
// | `lobby_admin` | `admin` | full access to Org and Site Pre-shared keys |
Views *AdminPrivilegeViewEnum `json:"views,omitempty"`
AdditionalProperties map[string]interface{} `json:"_"`
Views []AdminPrivilegeViewEnum `json:"views,omitempty"`
AdditionalProperties map[string]interface{} `json:"_"`
}

// String implements the fmt.Stringer interface for AdminPrivilege,
Expand Down Expand Up @@ -165,7 +165,7 @@ type tempAdminPrivilege struct {
Scope *AdminPrivilegeScopeEnum `json:"scope"`
SiteId *uuid.UUID `json:"site_id,omitempty"`
SitegroupIds []uuid.UUID `json:"sitegroup_ids,omitempty"`
Views *AdminPrivilegeViewEnum `json:"views,omitempty"`
Views []AdminPrivilegeViewEnum `json:"views,omitempty"`
}

func (a *tempAdminPrivilege) validate() error {
Expand Down
13 changes: 0 additions & 13 deletions mistapi/models/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,6 @@ const (
)

// AdminPrivilegeViewEnum is a string enum.
// Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users. Custom roles restrict Org users to specific UI views. This is useful for limiting UI access of Org users.
// You can define custom roles by adding the `views` attribute along with `role` when assigning privileges.
// Below are the list of supported UI views. Note that this is UI only feature.
// | UI View | Required Role | Description |
// | --- | --- | --- |
// | `reporting` | `read` | full access to all analytics tools |
// | `marketing` | `read` | can view analytics and location maps |
// | `super_observer` | `read` | can view all the organization except the subscription page |
// | `location` | `write` | can view and manage location maps, can view analytics |
// | `security` | `write` | can view and manage site labels, policies and security |
// | `switch_admin` | `helpdesk` | can view and manage Switch ports, can view wired clients |
// | `mxedge_admin` | `admin` | can view and manage Mist edges and Mist tunnels |
// | `lobby_admin` | `admin` | full access to Org and Site Pre-shared keys |
type AdminPrivilegeViewEnum string

const (
Expand Down
Loading

0 comments on commit 3178b2c

Please sign in to comment.