This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Visualitzation User
#1
Hi,

Is there any way to create a user that only have visualitzation rights?

It would be useful for example on an office building where users can see all the temperatures, setpoints and status but not allowed to change anything.
The administrator of the building (with its own user) should be the only user allowed to modify this values.

Thanks.
Reply
#2
You can add new user and give him partial access to visualisation. Then in visualisation tab give access rights what pages he can see. And on advanced tab add group addresses what he is allowed to see (only temp group addresses in your case).

But that solution hides all setpoints as well.
   
Reply
#3
In JS you can make all element read only and hide all inline elements like this. This will work only in gui
Code:
$(function() {
  if (window.Globals && Globals.user == 'admin') {
    $('.item-control').addClass('item-read-only');
    $('.item-control-single').addClass('hide');
  }
});
------------------------------
Ctrl+F5
Reply
#4
Thanks for the answers!

I'll try second option because we'd like to see the same information (despite the user) but make it only readable.
Reply
#5
(14.07.2022, 08:41)Daniel Wrote: In JS you can make all element read only and hide all inline elements like this. This will work only in gui
Code:
$(function() {
  if (window.Globals && Globals.user == 'admin') {
    $('.item-control').addClass('item-read-only');
    $('.item-control-single').addClass('hide');
  }
});

Hi Daniel,

Is there any way to differentiate link buttons from object buttons? I'd like to mantain links between plans active.

Thanks
Reply
#6
Try this, Add additional class 'link' to your links 
Code:
$(function() {
  if (window.Globals && Globals.user == 'admin') {
    $('.item-control').addClass('item-read-only');
    $('.item-control-single').addClass('hide');
    $('.link').removeClass('item-read-only');
  }
});
------------------------------
Ctrl+F5
Reply
#7
(14.07.2022, 10:35)Daniel Wrote: Try this, Add additional class 'link' to your links 
Code:
$(function() {
  if (window.Globals && Globals.user == 'admin') {
    $('.item-control').addClass('item-read-only');
    $('.item-control-single').addClass('hide');
    $('.link').removeClass('item-read-only');
  }
});

Hi, I've tryied and it works.
But in terms of security, is there any more secure way to do it?
Because it's pretty easy to enable it using web browser inspection tools...
Reply
#8
(14.07.2022, 10:35)Daniel Wrote: Try this, Add additional class 'link' to your links 
Code:
$(function() {
  if (window.Globals && Globals.user == 'admin') {
    $('.item-control').addClass('item-read-only');
    $('.item-control-single').addClass('hide');
    $('.link').removeClass('item-read-only');
  }
});

Hello Daniel,

I have two users whose names are manager and operator. The manager can access all element but the operator not all of them. 

Can we change this code to make read only if the operetor is logged in and a link is added to the additional class?

Thanks.
Reply
#9
If you need to hide certain plans for a user you can simply change access rights. Then a plan link to hidden plans won't be shown at all for this user.
Reply
#10
Hi,
No, I do not need to hide the plans. I need to make ready only some elements of the plan. For example, on/off is active but setpoint is ready only for the operator.
Thanks.
Reply
#11
This will make all elements with operator-read-only class read-only for operator username.
Code:
$(function() {
  if (window.Globals && Globals.user == 'operator') {
    $('.operator-read-only').addClass('item-read-only');
  }
});
Reply
#12
Thanks.
Reply


Forum Jump: