mattermost-community / mattermost-plugin-custom-attributes Goto Github PK
View Code? Open in Web Editor NEWMattermost plugin for adding custom attributes to users!
License: Apache License 2.0
Mattermost plugin for adding custom attributes to users!
License: Apache License 2.0
I don't want to mention a group, but all the people with a special attribute such as their timezone or interest. Kind of a dynamic at mention.
Perhaps when configuring each custom attribute the admin can optionally assign a name "handle" such as "@Timezone:PST" and the plugin intercepts that mention.
Issue created from a Mattermost message by @bcpg
.
Add documentation for #18
This is a great improvement! However, the new admin UI does not seem to be documented in the read-me. @marianunez or @aaronrothschild please advise on next steps.
Originally posted by @DHaussermann in #21 (comment)
After installing the custom attribute plugin, we enabling the plugin but can't see the custom attributes section.
When a server is running Team Edition the Admin UI will still show the Group ID field for Custom Attributes configuration.
This is of no value as LDAP group sync is unavailable and is confusing to use.
Group ID field should only be available when the current licence supports LDAP groups.
LDAP Groups are available in Enterprise Edition. In order to test the changes in this ticket, please open a PR as WIP first and a Mattermost Core Comitter can set up an EE server for testing.
If you leave the groupIDs blank in the config and save, it stores the value as a string instead of an empty array. This throws an error when the plugin loads.
Add a custom attribute without a group ID, save. Restart mattermost.
Everything appears to work, just this error is thrown in the mattermost.log
Error:
{"level":"info","ts":1626363133.3211172,"caller":"[email protected]/stream.go:15","msg":"2021/07/15 15:32:13 LoadPluginConfiguration API failed to unmarshal: json: cannot unmarshal string into Go struct field CustomAttribute.CustomAttributes.GroupIDs of type []string","plugin_id":"com.mattermost.custom-attributes","source":"plugin_stderr"}
Below is how it renders in the config.json
{
"GroupIDs": "",
"Name": "test",
"TeamIDs": [
"1wke6g5u5i8d8y58eax4yr66eo"
],
"UserIDs": [
"sda1qerd3jrzpdpe1tmarejthh"
]
}
This error is removed when you replace the config.json with the below:
{
"GroupIDs": [],
"Name": "test",
"TeamIDs": [
"1wke6g5u5i8d8y58eax4yr66eo"
],
"UserIDs": [
"sda1qerd3jrzpdpe1tmarejthh"
]
}
This seems like we can swap the default ''
to a []
and this is resolved. I tested this locally and this appeared to fix the issue with no impacts.
To Reproduce:
Expected:
Don't render as a link even if no spaces.
Hi, I can't get the custom user attributes plugin to work. Here's what I did:
sudo systemctl restart mattermost
and then I click on a user, and my custom attribute did not show up.Version 5.20.1
Schema Version: 5.20.0
Postgres
Hi everyone,
I'm looking for a mattermost plugin that allows decorating the user's name with arbitrary messages/symbols/emoji representing different status in the community.
If using emoji, these could be β (moderators), π (supporters), and so on.
The current plugin already provides most of the customization capabilities I'm after but I do not see any mention of the ability to display the information next to the user's name.
Note that by this I mean, shown next to the name on every message written by the user, not in the floating pop-up with the profile information.
Is this something that can be achieved with the current plugin and/or mattermost's customization capabilities?
Thanks
Steps :- 1) Create 2 attribute.
2) Now delete 1st attribute by click on the delete button.
3) now click on the delete icon of the 2nd attribute
issue:- Now Confirmation popup will not visible and user will get the error in the Console, but if the user delete 2nd attribute then delete 1st attribute then issue will not generate.
Hi,
I am unable to add a custom attribute.
I want to set the team name, but it is not recognized (it is registered as DSIMB in mattermost), neither are usernames (I tried with and without "@").
Here are versions infos (I installed mattermost via docker-compose):
root@www:~# docker exec -it b0fde455f218 mattermost version
Version: 5.30.0
Build Number: 5.30.0
Build Date: Fri Dec 18 06:52:48 UTC 2020
Build Hash: 25659c5b436aac171aedbee39ded4bc2ffac9838
Build Enterprise Ready: true
DB Version: 5.31.0
(I have Mattermost EE, without license key, the edition is not activated)
Would be great if the attribute can be linked to a SAML value. Not all values make sense as groups e.g. Manager for someones direct manager would not be a group I would bring in but would be awesome to be able to show it on user popups.
When adding or updating a custom attribute the team selection no longer finds any results even when there are team names that mach the search parameter.
Steps:
master
branch of the plugindkh
dkh
as a team to target with the custom attributeWhen a custom attribute us deleted from the system console, no confirmation dialogue is shown to prevent user error. Since this action can't be undone (and the record could contain long cryptic lists of metadata), there should be a prompt top prevent deleting an attribute by mistake.
Steps:
Observed: Attribute is immediately deleted
Expected: delete confirmation dialogue
When Custom Attributes data is updated, the updated version is not shown until you refresh the client.
This reproduces with versions that pre-date the admin config UI so, it is not new to v1.2
steps:
Expected:
New group name is displayed
Observed:
As the plugin isnβt included in the list of installable plugins for self-hosted Team edition, I have to build it to upload it. When trying to build a dist for the plugin from the clone located in a sibling directory of mattermost, I get the following error :
at /Users/anonymous/Documents/mattermost/mattermost-plugin-custom-attributes/webapp/node_modules/babel-loader/lib/index.js:55:71 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }
Anything Iβm missing out?
When an admin deletes a Custom Attributes group, there is no confirmation dialogue. Since this action cannot be undone, the user should be prompted to confirm the delete.
The README states the following:
You can also add an array of Mattermost group ID's to the GroupIDs parameter. The Name will then be displayed for all memebers who are apart of that group.
I do not know about the existence of groups in Mattermost, the search in System Console does not bring up anything. All I can think of are Teams
and Channels
.
There are also AD/LDAP Groups
, but such limitation (no teams edition support) is not stated in the README.
Thanks!
Currently, users can be mentioned with the group, like @cats
Mattermost allows users to silence @all
, @here
, etc.
It would be cool if users could silence their group mentions with a personal setting.
In addition to the cool text tags for user profiles, would it be possible to also add badges under people's profile pictures? The idea would be to have a "badge icon" for a team manager, a "computer icon" for a developer, etc. I like the way this plugin works, it would be nice to have something appear on their icon similar to their online status, so I can see these things "at a glance".
Mattermost confusingly has two types of groups - the ones that are like Slack groups, and also AD/LDAP groups.
My workspace has a @ group created for managers. But to use the custom attributes plugin, we had to manually add the 8 people in that group, because the 'group' field is actually trying to use AD/LDAP groups, rather than Mattermost groups!
We don't want to have a multi-team workspace. So it would be great to be able to specify a group name (not a AD/LDAP group ID) and have it figure out the rest.
Mattermost Version: 6.7.0
Database Schema Version: 82
Database: mysql
Once I hit : System Console --> PLUGINS --> Custom User Attributes -->Blank Screen and Developer Console shows the following:
websocket closed
react-dom.production.min.js:209 TypeError: e.map is not a function
at Tn.initAttributes (com.mattermost.custom-attributes_c968cd00178e3348_bundle.js:37:101572)
at new Tn (com.mattermost.custom-attributes_c968cd00178e3348_bundle.js:37:101510)
at Do (react-dom.production.min.js:134:171)
at Ur (react-dom.production.min.js:176:149)
at Ds (react-dom.production.min.js:263:490)
at c_ (react-dom.production.min.js:246:265)
at d_ (react-dom.production.min.js:246:194)
at a_ (react-dom.production.min.js:239:172)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:19:467)
ns @ react-dom.production.min.js:209
n.callback @ react-dom.production.min.js:226
fo @ react-dom.production.min.js:131
ss @ react-dom.production.min.js:212
F_ @ react-dom.production.min.js:255
t.unstable_runWithPriority @ scheduler.production.min.js:19
Yi @ react-dom.production.min.js:122
g_ @ react-dom.production.min.js:248
a_ @ react-dom.production.min.js:239
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:19
Yi @ react-dom.production.min.js:122
Vi @ react-dom.production.min.js:123
Ki @ react-dom.production.min.js:122
v @ react-dom.production.min.js:287
Vt @ react-dom.production.min.js:68
index.js:3404 [Util] handleError:: Uncaught TypeError: e.map is not a function
com.mattermost.agenda_6c1e12eaf003c4e3_bundle.js:16 [Util] handleError:: Uncaught TypeError: e.map is not a function
E @ com.mattermost.agenda_6c1e12eaf003c4e3_bundle.js:16
N @ com.mattermost.agenda_6c1e12eaf003c4e3_bundle.js:16
(anonymous) @ com.mattermost.agenda_6c1e12eaf003c4e3_bundle.js:16
github_1836b997ad13fd7e_bundle.js:22 [Util] handleError:: Uncaught TypeError: e.map is not a function
y @ github_1836b997ad13fd7e_bundle.js:22
R @ github_1836b997ad13fd7e_bundle.js:22
(anonymous) @ github_1836b997ad13fd7e_bundle.js:22
com.github.matterpoll.matterpoll_8d4d7b4076b9ba73_bundle.js:312 [Util] handleError:: Uncaught TypeError: e.map is not a function
b @ com.github.matterpoll.matterpoll_8d4d7b4076b9ba73_bundle.js:312
N @ com.github.matterpoll.matterpoll_8d4d7b4076b9ba73_bundle.js:312
(anonymous) @ com.github.matterpoll.matterpoll_8d4d7b4076b9ba73_bundle.js:312
focalboard_88e65f2249b46e8c_bundle.js:2 [Util] handleError:: Uncaught TypeError: e.map is not a function
react-dom.production.min.js:123 Uncaught TypeError: e.map is not a function
at Tn.initAttributes (com.mattermost.custom-attributes_c968cd00178e3348_bundle.js:37:101572)
at new Tn (com.mattermost.custom-attributes_c968cd00178e3348_bundle.js:37:101510)
at Do (react-dom.production.min.js:134:171)
at Ur (react-dom.production.min.js:176:149)
at Ds (react-dom.production.min.js:263:490)
at c_ (react-dom.production.min.js:246:265)
at d_ (react-dom.production.min.js:246:194)
at a_ (react-dom.production.min.js:239:172)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:19:467)
initAttributes @ com.mattermost.custom-attributes_c968cd00178e3348_bundle.js:37
Tn @ com.mattermost.custom-attributes_c968cd00178e3348_bundle.js:37
Do @ react-dom.production.min.js:134
Ur @ react-dom.production.min.js:176
Ds @ react-dom.production.min.js:263
c_ @ react-dom.production.min.js:246
d_ @ react-dom.production.min.js:246
a_ @ react-dom.production.min.js:239
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:19
Yi @ react-dom.production.min.js:122
Vi @ react-dom.production.min.js:123
Ki @ react-dom.production.min.js:122
v @ react-dom.production.min.js:287
Vt @ react-dom.production.min.js:68
Mattermost is currently in the process of using golangci-lint
as the default linter for all go projects. mattermost-community/mattermost-plugin-autolink#108 serves as an example of how the migration should look like:
.golangci.yml
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.Makefile
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.build/
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.go mod tidy
and make dist
to ensure the build system works fine.linters-settings.goimports.local-prefixes
to the go module path i.e. to github.com/mattermost/mattermost-plugin-aws-SNS
.make golangci-lint
and fix all issues that arise.Fixing an linter issue is sometimes trivial but can also be quite complicated. There might be cases, where ignoring an issue using issues.exclude-rules
is needed. If you don't know how to resolve an error, please reach out to @hanzei
on the Mattermost Community Server or ask the question here.
Hey, thanks for this useful plugin
say i regulary update my config.json
with custom attributes, do i need to restart mattermost to update the users attributes in the UI ?
Steps :- 1) Create 1 custom attribute and add it.
2) now remove all the data from all the input box.
3) end of the page you will find the "SAVE" Button, click on that.
issue :- The user can see the validation message for the mandatory input box still the user is able to Save the Custom attribute with Empty data. when the validation message is visible at that time The User should not able to save the custom attribute. (Pls see the video)
it is a massive headache to have to manually add attribs to hundreds of users.
would also be nice to define an attribute, make it required, and force user to pick from a pre-entered list, etc.
Hi. Can i add attributes which users can edit in profile settings ? How ?
If the server's SiteURL is configured with a subpath, the webapp's API calls do not work. The task here is to make this plugin's client to prefix its URLs with the SiteURL.
Here's an example of how the SiteURL may be computed:
https://github.com/mattermost/mattermost-plugin-jira/blob/19a9c2442817132b4eee5c77e259b80a40188a6a/webapp/src/selectors/index.js#L13-L26
When configuring a custom attribute in the System Console, you must provide the group ids in a simple text box. Implement a picker that can allow the user to search by group name and select based on a filtered list (like it currently does with the users).
LDAP Groups are available in Enterprise Edition. In order to test the changes in this ticket, please open a PR as WIP first and a Mattermost Core Comitter can set up an EE server for testing.
v0.0.1 supports Mattermost 5.4+
Hi, can you please provide a .tar.gz release? It would be super helpful. Or give instructions on how to compile?
Thanks!!
From here:
"For some more context, see here. The short version though is that we updated the web app to React 17, and there's a chance that plugins will have some issues with it because they're compiled with the React 16 version of ReactDOM. I'm submitting PRs to the 3 products, the demo plugin, and the plugin template to have them use the web app's version of React DOM to fix any immediate issues, but we'll want to properly migrate them to React 17 going forward."
Ticket Link
https://mattermost.atlassian.net/browse/MM-47046
Related Pull Requests
mattermost/mattermost-plugin-playbooks#1489
mattermost/focalboard#3861
mattermost-community/mattermost-plugin-todo#190
mattermost/mattermost-plugin-starter-template#169
Hi,
Can we update customs attributes using a REST API request without modifying the "config.json" file ?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.