Skip to content
Snippets Groups Projects
Commit c0a0f58d authored by deuce's avatar deuce
Browse files

Add can_access property to xtrn_area.prog{}

parent 33198e40
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,7 @@ static char* xtrn_prog_prop_desc[] = {
,"extra time given to users running this program"
,"maximum time allowed in program"
,"execution cost (credits to run this program)"
,"user has sufficient access to see this program"
/* Insert here */
,"user has sufficient access to run this program"
,NULL
......@@ -352,6 +353,13 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!js_CreateXtrnProgProperties(cx, progobj, cfg->xtrn[d]))
return(NULL);
if(user==NULL || chk_ar(cfg,cfg->xtrn[d]->ar,user))
val=JSVAL_TRUE;
else
val=JSVAL_FALSE;
if(!JS_SetProperty(cx, progobj, "can_access", &val))
return(NULL);
if(user==NULL || chk_ar(cfg,cfg->xtrn[d]->run_ar,user))
val=JSVAL_TRUE;
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment