source: FOIAVistA/trunk/r/CLINICAL_CASE_REGISTRIES-ROR/RORUTL11.m@ 1154

Last change on this file since 1154 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1RORUTL11 ;HCIOFO/SG - ACCESS AND SECURITY UTILITIES ; 7/21/03 10:28am
2 ;;1.5;CLINICAL CASE REGISTRIES;;Feb 17, 2006
3 ;
4 Q
5 ;
6 ;***** REBUILDS THE "ACL" CROSS-REFERENCE (USER ACCESS)
7 ;
8 ; Return Values:
9 ; <0 Error code
10 ; 0 Ok
11 ;
12RNDXACL() ;
13 N DA,DIK,REGIEN,ROOT
14 S ROOT=$$ROOT^DILFD(798.1,,1) K @ROOT@("ACL")
15 S REGIEN=0
16 F S REGIEN=$O(@ROOT@(REGIEN)) Q:'REGIEN D
17 . S DIK=$$ROOT^DILFD(798.118,","_REGIEN_","),DIK(1)=".01^ACL"
18 . S DA(1)=REGIEN D ENALL^DIK
19 Q 0
20 ;
21 ;***** CHECKS IF THE RPC CAN BE CALLED BY THE CURRENT USER
22 ;
23 ; RPCNAME Name of the RPC
24 ;
25 ; [REGIEN] Registry IEN
26 ;
27 ; [FLAGS] Flags that control the execution (can be combined):
28 ; A Administrator Only
29 ; I IRM Only
30 ;
31 ; Return Values:
32 ; <0 Error code
33 ; 0 Ok
34 ; >0 Access denied
35 ;
36RPCHECK(RPCNAME,REGIEN,FLAGS) ;
37 N ACCESS,KEY,RC
38 Q:$G(DUZ)'>0 $$ERROR^RORERR(-40,,,,"DUZ")
39 S FLAGS=$G(FLAGS),REGIEN=+$G(REGIEN)
40 ;---
41 S (ACCESS,RC)=0
42 D Q:ACCESS 0
43 . I REGIEN Q:$D(^ROR(798.1,"ACL",DUZ,REGIEN))<10
44 . E Q:$D(^ROR(798.1,"ACL",DUZ))<10
45 . I FLAGS["I" Q:'$D(^XUSEC("ROR VA IRM",DUZ))
46 . I FLAGS["A" S RC=1,KEY="" D Q:RC
47 . . F S KEY=$O(^ROR(798.1,"ACL",DUZ,REGIEN,KEY)) Q:KEY="" D Q:'RC
48 . . . I KEY?1"ROR"1.E S:KEY["ADMIN" RC=0
49 . S ACCESS=1
50 ;---
51 D ACVIOLTN^RORLOG(X,$G(REGIEN),RPCNAME)
52 Q 1
Note: See TracBrowser for help on using the repository browser.