Tại sao cần phân quyền dữ liệu theo nhóm User?

14222157_763683007001488_4736885832227847852_n.jpg?oh=b93b710cde398ecbb53bbb47f3c55543&oe=5884D63C&__gda__=1481178414_4d8e041326f482539c73507df001761c

CÁC BƯỚC THỰC HIỆN:
Step 1: Check phân quyền chức năng
Step 2: Sửa file dic muốn phân quyền
VD: file list.dic


DEMO: PHÂN QUYỀN DỮ LIỆU THEO NHÓM USER
- Admin và nhóm HTcó quyền xem danh sách.
- Admin có quyền sửa duyệt, nhóm user HT thì không.
➔ ẩn cột xử lý với nhóm HT không có quyền sửa.

14117749_763683940334728_6119886856957810349_n.jpg?oh=db0bbcce454fa33ad741f69e94fe0da1&oe=5882ABA7&__gda__=1480332792_5c9adfff1a6f3504c2c58aeb9db6cd8e

Step 1: Check phân quyền chức năng quản lý phòng ban:
Tìm chức năng quản lý phòng ban (Quản lý NSD & Phân quyền-> Danh mục chức năng)

14100278_763684493668006_6849722170911828707_n.jpg?oh=2698e5e1b931c32920d8e9db4230fe72&oe=585018D6&__gda__=1482032991_2988ae1500e5dfbc988cb1afd46617df

14054051_763684787001310_8623215709843009138_n.jpg?oh=eed0587c6a4b075ed932557eb28eaeca&oe=58856431

14232512_763685337001255_1230057090972245899_n.jpg?oh=46bc0b97c0c5b1375d08c93e0dfe1716&oe=583ED08D

14183874_763685340334588_1552881301979190436_n.jpg?oh=85237969044e515e6b77724416e26c49&oe=583F3C33

KẾT QUẢ:

14064069_763685333667922_1779928359722136994_n.jpg?oh=037fe1975b25e05698db589ce382fcbe&oe=5846AE8F&__gda__=1480703115_da94aaedd42dd244bf58a7809bb58705

SOURCE CODE:

DefaultOrderField==CREATED
    DefaultOrderType==DESC
Html
    HiddenFields=:
    :{
        !session = action.getRequest().getSession();
        userId = action.getParameters().get("session.userId");
        if(userId == null || userId.equals(""))
        {
            userId = "";
            session.setAttribute("userId",userId);
        }
        userIdValue = -1;
        if(userId != null && !userId.equals(""))
            userIdValue = java.lang.Integer.valueOf(userId);
        session.setAttribute("userIdValue", userIdValue);
        associatedGroups = session.getAttribute("associatedGroups");
        if(associatedGroups == null)
        {
            associatedGroups = new java.util.ArrayList();
            groupAnonymous = com.ftl.wak.mgr.AdmHelper.getInstance().getGroup("Anonymous");
            if(groupAnonymous != null)
                associatedGroups.add(groupAnonymous.getId());
            session.setAttribute("associatedGroups",associatedGroups);
        }
        groupIdentified = com.ftl.wak.mgr.AdmHelper.getInstance().getGroup("Identified");
        if(groupIdentified != null)
        {
            if(associatedGroups.indexOf(groupIdentified.getId()) < 0)
                associatedGroups.add(groupIdentified.getId());
        }
        session.setAttribute("associatedGroups", associatedGroups);
        updatePermission = com.ftl.wak.mgr.AdmHelper.getInstance().getModulePermission( userIdValue,associatedGroups,"com.ftl.ppm.center_region");
        hiddenField = "";
        if(updatePermission.indexOf("U") < 0)  
            hiddenField += "PROCESS";
        hiddenField;
    :}
#    MaximumRowFetched==20
#Json
#    MaximumRowFetched==20