Skip to content

Commit

Permalink
Merge pull request #13 from polarityio/develop
Browse files Browse the repository at this point in the history
Improve no summary attributes
  • Loading branch information
sarus committed Sep 10, 2024
2 parents f2c4a58 + b7757fd commit 484f8a9
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 37 deletions.
6 changes: 0 additions & 6 deletions components/ldap-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ polarity.export = PolarityComponent.extend({
}
});

if (values.length === 0) {
values.push({
value: 'User Found'
});
}

return values;
}
)
Expand Down
85 changes: 67 additions & 18 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = {
ca: '',
// An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for
// the url parameter (by embedding the auth info in the uri)
proxy: ""
proxy: ''
},
/**
* Options that are displayed to the user/admin in the Polarity integration user-interface. Should be structured
Expand Down Expand Up @@ -250,8 +250,8 @@ module.exports = {
}
],
multiple: true,
userCanEdit: true,
adminOnly: false
userCanEdit: false,
adminOnly: true
},
{
key: 'summaryCustomUserAttributes',
Expand All @@ -260,8 +260,8 @@ module.exports = {
'Custom user attributes you would like to display in the summary portion of the integration as tags. Provide a comma delimited list. Attributes are case sensitive.',
default: '',
type: 'text',
userCanEdit: true,
adminOnly: false
userCanEdit: false,
adminOnly: true
},
{
key: 'detailedUserAttributes',
Expand All @@ -270,20 +270,72 @@ module.exports = {
'Select user attributes you would like to display in the details portion of the integration',
default: [
{
value: 'displayName',
display: 'Display Name'
value: 'cn',
display: 'CN'
},
{
value: 'comment',
display: 'Comment'
},
{
value: 'description',
display: 'Description'
},
{
value: 'distinguishedName',
display: 'Distinguished Name'
},
{
value: 'userAccountControl',
display: 'User Account Control'
value: 'displayName',
display: 'Display Name'
},
{
value: 'employeeID',
display: 'Employee Id'
},
{
value: 'givenName',
display: 'Given Name'
},
{
value: 'initials',
display: 'Initials'
},
{
value: 'lockoutTime',
display: 'Lockout Time'
},
{
value: 'mail',
display: 'Mail'
},
{
value: 'memberOf',
display: 'Member Of'
},
{
value: 'pwdLastSet',
display: 'Pwd Last Set'
},
{
value: 'sAMAccountName',
display: 'SAM Account Name'
},
{
value: 'sn',
display: 'SN'
},
{
value: 'userAccountControl',
display: 'User Account Control'
},
{
value: 'userPrincipalName',
display: 'User Principal Name'
},
{
value: 'whenCreated',
display: 'When Created'
}
],
type: 'select',
Expand Down Expand Up @@ -358,8 +410,8 @@ module.exports = {
}
],
multiple: true,
userCanEdit: true,
adminOnly: false
userCanEdit: false,
adminOnly: true
},
{
key: 'detailedCustomUserAttributes',
Expand All @@ -368,16 +420,14 @@ module.exports = {
'Custom user attributes you would like to display in the details portion of the integration. Provide a comma delimited list. Attributes are case sensitive.',
default: '',
type: 'text',
userCanEdit: true,
adminOnly: false
userCanEdit: false,
adminOnly: true
},
{
key: 'attributeDisplayMappings',
name: 'Attribute Display Name Mappings',
description:
'A comma delimited list of attribute display name mappings which let you change the display name of an attribute in the integration. This can be used to provide human-readable ' +
'attributes. Each mapping should be the original attribute name followed by a colon and then the desired display name. For example, if the attribute is "flm" and you want that to display as "front line manager", ' +
'you would enter "flm:Front line manager". Attribute names are case-sensitive.',
'A comma delimited list of attribute display name mappings which let you change the display name of an attribute in the integration. This can be used to provide human-readable attributes. Each mapping should be the original attribute name followed by a colon and then the desired display name. For example, if the attribute is "flm" and you want that to display as "front line manager", you would enter "flm:Front line manager". Attribute names are case-sensitive.',
default: 'cn:Common name,dc:Domain component',
type: 'text',
userCanEdit: false,
Expand All @@ -387,8 +437,7 @@ module.exports = {
key: 'simplifiedGroupNames',
name: 'Display Simplified Group Names',
description:
'If checked, group names will only show the leaf entry of the fully qualified group name. For example, if the full group name is "CN=PolarityUsers,CN=Users,DC=polarity,DC=io", when this option is checked ' +
'the group name would be displayed as "PolarityUsers". Group names are only shown if your LDAP implementation includes a "memberOf" attribute.',
'If checked, group names will only show the leaf entry of the fully qualified group name. For example, if the full group name is "CN=PolarityUsers,CN=Users,DC=polarity,DC=io", when this option is checked the group name would be displayed as "PolarityUsers". Group names are only shown if your LDAP implementation includes a "memberOf" attribute.',
default: false,
type: 'boolean',
userCanEdit: false,
Expand Down
76 changes: 64 additions & 12 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,38 +187,90 @@
}
],
"multiple": true,
"userCanEdit": true,
"adminOnly": false
"userCanEdit": false,
"adminOnly": true
},
{
"key": "summaryCustomUserAttributes",
"name": "Custom Summary User Attributes",
"description": "Custom user attributes you would like to display in the summary portion of the integration as tags. Provide a comma delimited list. Attributes are case sensitive.",
"default": "",
"type": "text",
"userCanEdit": true,
"adminOnly": false
"userCanEdit": false,
"adminOnly": true
},
{
"key": "detailedUserAttributes",
"name": "Detailed User Attributes",
"description": "Select user attributes you would like to display in the details portion of the integration",
"default": [
{
"value": "displayName",
"display": "Display Name"
"value": "cn",
"display": "CN"
},
{
"value": "comment",
"display": "Comment"
},
{
"value": "description",
"display": "Description"
},
{
"value": "distinguishedName",
"display": "Distinguished Name"
},
{
"value": "userAccountControl",
"display": "User Account Control"
"value": "displayName",
"display": "Display Name"
},
{
"value": "employeeID",
"display": "Employee Id"
},
{
"value": "givenName",
"display": "Given Name"
},
{
"value": "initials",
"display": "Initials"
},
{
"value": "lockoutTime",
"display": "Lockout Time"
},
{
"value": "mail",
"display": "Mail"
},
{
"value": "memberOf",
"display": "Member Of"
},
{
"value": "pwdLastSet",
"display": "Pwd Last Set"
},
{
"value": "sAMAccountName",
"display": "SAM Account Name"
},
{
"value": "sn",
"display": "SN"
},
{
"value": "userAccountControl",
"display": "User Account Control"
},
{
"value": "userPrincipalName",
"display": "User Principal Name"
},
{
"value": "whenCreated",
"display": "When Created"
}
],
"type": "select",
Expand Down Expand Up @@ -293,17 +345,17 @@
}
],
"multiple": true,
"userCanEdit": true,
"adminOnly": false
"userCanEdit": false,
"adminOnly": true
},
{
"key": "detailedCustomUserAttributes",
"name": "Custom Detailed User Attributes",
"description": "Custom user attributes you would like to display in the details portion of the integration. Provide a comma delimited list. Attributes are case sensitive.",
"default": "",
"type": "text",
"userCanEdit": true,
"adminOnly": false
"userCanEdit": false,
"adminOnly": true
},
{
"key": "attributeDisplayMappings",
Expand Down
2 changes: 1 addition & 1 deletion templates/ldap-block.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{{#if group.isExpanded}}
<div class="group-member-container">
{{#each group.users as |user|}}
<div class="user-line">{{user.name}} &lt;{{user.mail}}&gt;</div>
<div class="user-line">{{user.name}} {{#if user.mail}}&lt;{{user.mail}}&gt;{{/if}}</div>
{{/each}}
</div>
{{#if (eq group.users.length 25)}}
Expand Down
9 changes: 9 additions & 0 deletions templates/ldap-summary.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@
</span>
</span>
{{/each}}

{{#if (eq summaryAttributes.length 0)}}
<span {{on "click" (optional this.scrollToIntegration)}} class="integration-summary-tag integration-background-color integration-border-color">
<span class="acronym integration-text-bold-color">{{block.acronym}}</span>
<span class="integration-text-color">
User found
</span>
</span>
{{/if}}

0 comments on commit 484f8a9

Please sign in to comment.