Skip to content

Commit

Permalink
Limit access to authorized data on Events, Alarms, Tabular viewers.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed Sep 3, 2024
1 parent d8dba4a commit c7eab9a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/server_realtime_auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1900,6 +1900,13 @@ let pool = null

let Results = []
results.map((node) => {
// check for group1 list in user rights (from token)
if (AUTHENTICATION && userRights.group1List.length > 0) {
if (!userRights.group1List.includes(node.group1)) {
// Access to data denied!
return node
}
}
let NodeId = {
IdType: opcIdTypeString,
Id: node.tag,
Expand Down Expand Up @@ -2122,6 +2129,13 @@ let pool = null

let Results = []
await results.map((node) => {
// check for group1 list in user rights (from token)
if (AUTHENTICATION && userRights.group1List.length > 0) {
if (!userRights.group1List.includes(node.group1)) {
// Access to data denied!
return node
}
}
let Value = {
Value: {
Type: opc.DataType.String,
Expand Down

0 comments on commit c7eab9a

Please sign in to comment.