Commit dec2bd60 authored by claes's avatar claes

New privilege RtEvents

parent ed76ec0a
......@@ -54,19 +54,20 @@ dcli_tCmdTable user_command_table[] = {
&user_modify_func,
{ "dcli_arg1", "dcli_arg2", "/user", "/group",
"/password", "/privilege" ,
"/rtread", "/rtwrite", "/system",
"/rtread", "/rtwrite", "/rtevents", "/system",
"/maintenance", "/process", "/instrument",
"/operator1", "/operator2", "/operator3",
"/operator4", "/operator5", "/operator6",
"/operator7", "/operator8", "/operator9",
"/oper10", "/devread", "/devplc",
/* "/oper10",*/ "/devread", "/devplc",
"/devconfig", "/devclass",
"/nortread", "/nortwrite", "/nosystem",
"/nortread", "/nortwrite", "/nortevents",
"/nosystem",
"/nomaintenance", "/noprocess", "/noinstrument",
"/nooperator1", "/nooperator2", "/nooperator3",
"/nooperator4", "/nooperator5", "/nooperator6",
"/nooperator7", "/nooperator8", "/nooperator9",
"/nooper10", "/nodevread", "/nodevplc",
/* "/nooper10",*/ "/nodevread", "/nodevplc",
"/nodevconfig", "/nodevclass",
"/nouserinherit", "/userinherit",
""}
......@@ -76,7 +77,7 @@ dcli_tCmdTable user_command_table[] = {
&user_add_func,
{ "dcli_arg1", "dcli_arg2", "/user", "/group",
"/password", "/privilege" ,
"/rtread", "/rtwrite", "/system",
"/rtread", "/rtwrite", "/rtevents", "/system",
"/maintenance", "/process", "/instrument",
"/operator1", "/operator2", "/operator3",
"/operator4", "/operator5", "/operator6",
......@@ -188,7 +189,7 @@ static int user_help_func( void *client_data,
"pwr_user help" << endl << endl <<
"add group 'systemgroup' /userinherit Add system group." << endl <<
"add user 'user' /group= /password= Add user." << endl <<
" /rtread /rtwrite /system /maintenance" << endl <<
" /rtread /rtwrite /rtevents /system /maintenance" << endl <<
" /process /instrument /operator1 /operator2" << endl <<
" /operator3 /operator4 /operator5 /operator6" << endl <<
" /operator7 /operator8 /operator9 /oper10" << endl <<
......@@ -207,7 +208,7 @@ static int user_help_func( void *client_data,
cout <<
"pwr_user help" << endl << endl <<
"modify user 'user' /group= /password= Modify user." << endl <<
" /rtread /rtwrite /system /maintenance" << endl <<
" /rtread /rtwrite /rtevents /system /maintenance" << endl <<
" /process /instrument /operator1 /operator2" << endl <<
" /operator3 /operator4 /operator5 /operator6" << endl <<
" /operator7 /operator8 /operator9 /oper10" << endl <<
......@@ -341,6 +342,8 @@ static int user_add_func( void *client_data,
privilege |= pwr_mPrv_RtRead;
if ( ODD( dcli_get_qualifier( "/rtwrite", privilege_str)))
privilege |= pwr_mPrv_RtWrite;
if ( ODD( dcli_get_qualifier( "/rtevents", privilege_str)))
privilege |= pwr_mPrv_RtEvents;
if ( ODD( dcli_get_qualifier( "/system", privilege_str)))
privilege |= pwr_mPrv_System;
if ( ODD( dcli_get_qualifier( "/maintenance", privilege_str)))
......@@ -519,6 +522,8 @@ static int user_modify_func( void *client_data,
privilege |= pwr_mPrv_RtRead;
if ( ODD( dcli_get_qualifier( "/rtwrite", privilege_str)))
privilege |= pwr_mPrv_RtWrite;
if ( ODD( dcli_get_qualifier( "/rtevents", privilege_str)))
privilege |= pwr_mPrv_RtEvents;
if ( ODD( dcli_get_qualifier( "/system", privilege_str)))
privilege |= pwr_mPrv_System;
if ( ODD( dcli_get_qualifier( "/maintenance", privilege_str)))
......@@ -560,6 +565,8 @@ static int user_modify_func( void *client_data,
privilege &= ~pwr_mPrv_RtRead;
if ( ODD( dcli_get_qualifier( "/nortwrite", privilege_str)))
privilege &= ~pwr_mPrv_RtWrite;
if ( ODD( dcli_get_qualifier( "/nortevents", privilege_str)))
privilege &= ~pwr_mPrv_RtEvents;
if ( ODD( dcli_get_qualifier( "/nosystem", privilege_str)))
privilege &= ~pwr_mPrv_System;
if ( ODD( dcli_get_qualifier( "/nomaintenance", privilege_str)))
......
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