Use x ++ to obtain whether the current user has the permission level of a security key. Complete job demonstration

Source: Internet
Author: User

// Use X ++ to obtain whether the current user has the permission level of a security key. Complete job demonstration <br/> static void xyf_checksecurity (ARGs _ ARGs) <br/>{< br/> dictsecuritykey _ dictskey = new dictsecuritykey (securitykeynum (custtables); <br/> dictenum _ dictenum = new dictenum (enumnum (accesstype )); <br/> STR 50 left St; <br/> int I; <br/> accesstype fkeyaccess; <br/>;</P> <p> fkeyaccess = _ dictskey. rights (); // returns the table's security key level permission Int or accesstype type <br/> Print _ d Ictskey. name (); <br/> Print _ dictskey. ID (); <br/> Print _ dictskey. configurationkeyid (); <br/> Print _ dictskey. label (); <br/> Print _ dictskey. parentsecuritykeyid (); <br/> Print fkeyaccess; </P> <p> Print _ dictenum. value2symbol (fkeyaccess); <br/> Print _ dictenum. symbol2value ('delete'); <br/> Print _ dictenum. index2name (fkeyaccess); </P> <p> I = _ dictenum. values (); // five enumerated values <br/> Print the enum of "accesst Ype "have ', I, 'Elements'; <br/> while (I) <br/> {<br/> Print 'the ', I,' ', _ dictenum. value2name (I); <br/> I --; <br/>}< br/> Print 'current securitykey number have ', _ dictenum. name2value (_ dictenum. value2symbol (fkeyaccess); </P> <p> for (I = 1; I <= _ dictenum. name2value (_ dictenum. value2symbol (fkeyaccess); I ++) <br/>{< br/> If (! St) <br/> ST = _ dictenum. value2label (I); <br/> else <br/> st + = ',' + _ dictenum. value2label (I); <br/>}</P> <p> Info ("you are have some securitykey of '" + st + "'"); </P> <p> If (fkeyaccess <accesstype: Edit) <br/>{< br/> Info ('You do not have edit right '); <br/>}< br/> else <br/> Info ('you have edit right'); <br/> pause; <br/>}< br/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.