Commit 5d393e9f authored by claes's avatar claes

Sev privileges added

parent e19e713d
/*
* Proview $Id: pwr_privilege.h,v 1.5 2008-06-24 06:59:37 claes Exp $
* Proview $Id: pwr_privilege.h,v 1.6 2008-09-05 08:56:40 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -47,7 +47,9 @@ typedef enum {
pwr_mPrv_DevConfig = 1 << 23,
pwr_mPrv_DevClass = 1 << 24,
pwr_mPrv_RtEvents = 1 << 25,
pwr_mPrv_Administrator = 1 << 26
pwr_mPrv_Administrator = 1 << 26,
pwr_mPrv_SevRead = 1 << 27,
pwr_mPrv_SevAdmin = 1 << 28
} pwr_mPrv;
typedef enum {
......@@ -95,6 +97,8 @@ typedef enum {
pwr_mPrv_Operator8 |
pwr_mPrv_Operator9 |
pwr_mPrv_Operator10,
pwr_mAccess_AllSev = pwr_mPrv_SevRead |
pwr_mPrv_SevAdmin,
pwr_mAccess_AllPwr = ~(1 << 31),
pwr_mAccess_Default = 1 << 31
} pwr_mAccess;
......
/**
* Proview $Id: co_user.cpp,v 1.9 2008-06-24 07:04:33 claes Exp $
* Proview $Id: co_user.cpp,v 1.10 2008-09-05 08:56:58 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -1121,6 +1121,9 @@ void GeUser::priv_to_string( unsigned int priv, char *str, int size)
if ( priv & pwr_mPrv_DevPlc) strcat(buff, "DevPlc ");
if ( priv & pwr_mPrv_DevConfig) strcat(buff, "DevConfig ");
if ( priv & pwr_mPrv_DevClass) strcat(buff, "DevClass ");
if ( priv & pwr_mPrv_Administrator) strcat(buff, "Administrator ");
if ( priv & pwr_mPrv_SevRead) strcat(buff, "SevRead ");
if ( priv & pwr_mPrv_SevAdmin) strcat(buff, "SevAdmin ");
strncpy( str, buff, size);
str[size-1] = 0;
}
......@@ -1147,6 +1150,8 @@ void GeUser::rt_priv_to_string( unsigned int priv, char *str, int size)
if ( priv & pwr_mPrv_Operator8) strcat(buff, "Operator8 ");
if ( priv & pwr_mPrv_Operator9) strcat(buff, "Operator9 ");
if ( priv & pwr_mPrv_Operator10) strcat(buff, "Operator10 ");
if ( priv & pwr_mPrv_SevRead) strcat(buff, "SevRead ");
if ( priv & pwr_mPrv_SevAdmin) strcat(buff, "SevAdmin ");
strncpy( str, buff, size);
str[size-1] = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment