Jump to content
Toggle menu
  • 915 articles
  • 3.8K files
  • 30.2K users
  • 279.2K edits
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Tenant class: Difference between revisions

From Catglobe Wiki
Nguyenduyan (talk | contribs)
No edit summary
Nguyenduyan (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 22: Line 22:
{{CGscriptMethods_Template|ReturnType=Tenant|Name=<nowiki>Tenant_getById</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=Tenant|Name=<nowiki>Tenant_getById</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>id</nowiki>|Description=<nowiki>Id of the item to fetch</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>id</nowiki>|Description=<nowiki>Id of the item to fetch</nowiki>}}
|Description=<nowiki>Fetch SsoTenant by primary key. Returns Empty if not found</nowiki>}}
|Description=<nowiki>Fetch SsoTenant by primary key</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Tenant|Name=<nowiki>Tenant_getByTenantId</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>id</nowiki>|Description=<nowiki>Id of the item to fetch</nowiki>}}
|Description=<nowiki>Fetch SsoTenant by tenant id</nowiki>}}
}}
}}
=== <span style="color:#DF8621">'''Examples'''</span> ===
<source lang="javascript">
Tenant t = Tenant_getById(tenatId);
//t.AddPasswordCompatTenantUsers({userId: {"mapping"}});
t.AddPasswordCompatTenantUsers({20708200: {"agent-1"}});
t.Save();
</source>

Latest revision as of 07:35, 9 September 2025

Tenant



Represents a SsoTenant.

Parent class

Inherits from object

Methods

  • Empty AddPasswordCompatTenantUsers(Dictionary userRoles "Dictionary of user id and array of roles") - For backwards compatibility with username/password users, using this you can setup a user to belong to the current tenant with the given role list
  • Empty RemovePasswordCompatTenantUsers(array users "User ids") - Remove all fake tenant roles for the given user ids
  • Empty Save() - Apply all changes to the SsoTenant
  • (From object) string ToString() - The string representation of the object.

Properties

  • TenantMapping Mapping { get; } - Role mapping and parent folder for the tenant
  • string ObjectTypeName { get; } - The name of the type of object.
  • TenantOnboarding Onboarding { get; } - Onboarding info for the tenant
  • ResourceEdit ResourceModel { get; } - Edit the Resource
  • string TenantId { get; set; } - Get/set the tenant id - e.g. for Microsoft this is a guid
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.

Static Methods

  • Tenant Tenant_create() - Create a new SsoTenant
  • Tenant Tenant_getById(int id "Id of the item to fetch") - Fetch SsoTenant by primary key
  • Tenant Tenant_getByTenantId(string id "Id of the item to fetch") - Fetch SsoTenant by tenant id


Examples

Tenant t = Tenant_getById(tenatId);
//t.AddPasswordCompatTenantUsers({userId: {"mapping"}});
t.AddPasswordCompatTenantUsers({20708200: {"agent-1"}});
t.Save();