Add organization authorization to every document inside the project setΒΆ


You can find these scripts inside the folder pmis/STND_PMIS/test/console/example.
If you want to execute them, you can use the Jython Console from the devtool menu.

filename =>

project = 'GLB_PMIS'

serv = Beans.registerService;

list = sql("""
select (select entprs_cd from pmis_user where user_no = t1.regit) as entprs_cd, t1.* from doc_hist t1, doc_dgn_cat t2 where t1.doc_seq = t2.doc_seq and t2.pjt_cd = ? and t1.pjt_cd = ?
;""", project, project);

for doc in list:
    print str(doc['hist_seq'])
    #serv.addEntprsAuthorization( str(doc['hist_seq']), doc['entprs_cd'] )