TC determine whether the current user has write access to the BOM line

InterfaceAIFComponent aifComponent = this.app.getTargetComponent();

TCAccessControlService accessControlService = session

.getTCAccessControlService();

boolean isWrite = false;

try {

isWrite = accessControlService.checkUsersPrivilege(

this.session.getUser(), (TCComponent) aifComponent,

TCAccessControlService.WRITE);

} catch (TCException e1) {

// TODO Auto-generated catch block

e1.printStackTrace ();

}

 

if (!isWrite) {

MessageBox.post (AIFUtility.getActiveDesktop (), "the current user to select bom row without written permission"

"提示", MessageBox.INFORMATION);

return;

}
 

Published 13 original articles · won praise 0 · Views 662

Guess you like

Origin blog.csdn.net/u014457991/article/details/104740304