Hi,
currently when we add some pdf files to a thread it open in same tab link nodebb, is there a "hack" to open it in new tab?
Thx!
Erik
Hi,
currently when we add some pdf files to a thread it open in same tab link nodebb, is there a "hack" to open it in new tab?
Thx!
Erik
Hi,
NodebbVersion: 3.4.2
the funtion "Mark All as Read":
has a Bug, it will set also key entrys in uid:<userid>:tids_read for threads where this user has no right to see
Example:
All this threadid's user with id 475 has no rights to see.
Thx!
Erik
i created a plugin: https://www.npmjs.com/package/nodebb-plugin-who-read-it
@baris i take your plugin "browsing-users" and create a new one "who-read-it". I hope it is okay for you
currently it looks like this:
the timestamp i like to have in the tooltip behind the username, but i dont know who, maybe you have a idea?
<div component="topic/who-read-it" class="d-flex gap-1">
<i class="fa fa-check fa-fw" title="Who Read It"></i>
<br>
{{{ each whoreadit }}}
<div data-uid="{./uid}">
<a class="text-decoration-none" href="{{{ if ./userslug }}}{config.relative_path}/user/{./userslug}{{{ else }}}#{{{ end }}}">
{buildAvatar(whoreadit, "24px", true, "avatar-tooltip","title=test")}{./readtimestamp}
</a>
</div>
{{{ end }}}
</div>
ahh i see in source code, but in admin page i see only this:
ah okay nice but something like:
tid:<tid>:uids_read dont exist or? (that would be perfect for me ^^)
@baris thx for the great plugin, but why did you remove the save button in the latest version 3.1.0
https://github.com/barisusakli/nodebb-plugin-browsing-users/commit/5c95ccd4852e25ac9fdab21bb8514a196723025e
mhhh thats not exaktly what i mean, me as a admin i want a list of users read specified thread and optional "when" did they read it. maybe via api?
Hi,
can i see which user has read a thread anywhere?
Thx!
Erik
Hi,
i have a little Change, that will also leave User when NOT in ldap group:
groupJoin: (ldapGroup, ldapId, uid, callback) => {
winston.verbose("[LDAP] groupJoin " + ldapGroup.cn + " for user " + ldapId + " uid " + uid)
nodebb_ldap.createGroup(ldapGroup,
(err, groupId) => {
if (err) {
return callback(err);
}
let members = ldapGroup.uniqueMember;
if (!Array.isArray(members)) {
members = [members];
}
winston.verbose("[LDAP] groupJoin members " + members && typeof members)
let found = false
if (members) {
members.forEach(member => {
if (member && member.indexOf(ldapId) != -1) {
found = true
}
});
}
if (found) {
const groupsToJoin = [groupId];
if ((master_config.admin_groups || '').split(',').includes(ldapGroup.cn)) {
winston.verbose("[LDAP] joins admin group")
groupsToJoin.push('administrators');
}
if ((master_config.moderator_groups || '').split(',').includes(ldapGroup.cn)) {
groupsToJoin.push('Global Moderators');
}
return groups.join(groupsToJoin, uid, callback);
} else {
const groupsToUnJoin = [groupId];
winston.verbose("[LDAP] unjoins group" + ldapGroup.cn + " uid " + uid);
return groups.leave(groupsToUnJoin, uid, callback);
//callback();
}
}
);
},
thats realy cool for use maybe someone else will help it
can i force login to use local db and not ldap? because in local also in ldap there are same username like "administrator" ^^ and now i cant login with local administrator user
thx upgraded it and it works
i found a bug in script, if checkbox is set:
it tries to add ldap user to group "registered" and everytime it tries to create the group again. and thats let the server restarting:
2023-04-28T12:48:50.475Z [4567/3263] - [32minfo[39m: [GROUP] joinRegisteredGroup
2023-04-28T12:48:50.475Z [4567/3263] - [32minfo[39m: [GROUP] creating registered group
registered
2023-04-28T12:48:50.476Z [4567/3263] - [32minfo[39m: [GROUP] join registered group
2023-04-28T12:48:50.481Z [4567/3263] - [31merror[39m: uncaughtException: [[error:group-already-exists]]
Error: [[error:group-already-exists]]
at Groups.create (/root/nodebb/src/groups/create.js:24:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {"date":"Fri Apr 28 2023 12:48:50 GMT+0000 (Koordinierte Weltzeit)","error":{},"exception":true,"os":{"loadavg":[0.12,0.19,0.11],"uptime":3426.95},"process":{"argv":["/usr/bin/node","/root/nodebb/app.js"],"cwd":"/root/nodebb","execPath":"/usr/bin/node","gid":0,"memoryUsage":{"arrayBuffers":19242735,"external":21458138,"heapTotal":91611136,"heapUsed":86136800,"rss":162127872},"pid":3263,"uid":0,"version":"v18.16.0"},"stack":"Error: [[error:group-already-exists]]\n at Groups.create (/root/nodebb/src/groups/create.js:24:10)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","trace":[{"column":10,"file":"/root/nodebb/src/groups/create.js","function":"Groups.create","line":24,"method":"create","native":false},{"column":5,"file":"node:internal/process/task_queues","function":"process.processTicksAndRejections","line":95,"method":"processTicksAndRejections","native":false}]}
2023-04-28T12:48:50.481Z [4567/3263] - [31merror[39m: Error: [[error:group-already-exists]]
at Groups.create (/root/nodebb/src/groups/create.js:24:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-04-28T12:48:50.482Z [4567/3263] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2023-04-28T12:48:50.484Z [4567/3263] - [32minfo[39m: [app] Web server closed to connections.
2023-04-28T12:48:50.489Z [4567/3263] - [32minfo[39m: [app] Live analytics saved.
2023-04-28T12:48:50.494Z [4567/3263] - [32minfo[39m: [app] Database connection closed.
2023-04-28T12:48:50.494Z [4567/3263] - [32minfo[39m: [app] Shutdown complete.
if think at this place in source:
Who can do such Bugfix?
Hi,
is there any way to get via api also hidden groups? for my project it would be awesome.
Thx!
Erik
show me your settings via pm, maybe i can help
hi, i installed wrong version
i docs it says:
npm install nodebb-plugin-node-ldap
but correct is:
npm install @nodebb/nodebb-plugin-node-ldap
and tadaaaa its working
is set a commit
would be realy nice... all our tools are connected to our ldap... (bookstack, zulip, wekan and so on). so nodebb is the last and it would be quit perfect if our employees could login with same username and pass like everywhere else
we use openldap... but in my case all settings under plugins -> ldap will not saved
any news to this? does anyone got it work with current version 2.8.12?
and it works immediately, how cool is that! THANKS!