Esempio n. 1
0
    def create_base_securitypoints():
        #Menu
        reg_point("tinyms.sidebar.archives.show", u"菜单", u"侧边栏", u"人员档案")
        reg_point("tinyms.sidebar.role_org.show", u"菜单", u"侧边栏", u"角色组织")
        reg_point("tinyms.sidebar.sys_categories.show", u"菜单", u"侧边栏", u"系统分类")
        reg_point("tinyms.sidebar.sys_params.show", u"菜单", u"侧边栏", u"系统参数")
        #OrgTreeView
        reg_point("tinyms.view.orgtree.list", u"角色组织", u"组织", u"查看组织列表")
        reg_point("tinyms.view.orgtree.view", u"角色组织", u"组织", u"查看组织明细")
        reg_point("tinyms.view.orgtree.add", u"角色组织", u"组织", u"添加组织")
        reg_point("tinyms.view.orgtree.update", u"角色组织", u"组织", u"修改组织")
        reg_point("tinyms.view.orgtree.delete", u"角色组织", u"组织", u"删除组织")
        #分类管理
        reg_point("tinyms.view.termtaxonomy.list", u"角色组织", u"分类", u"查看分类列表")
        reg_point("tinyms.view.termtaxonomy.view", u"角色组织", u"分类", u"查看分类明细")
        reg_point("tinyms.view.termtaxonomy.add", u"角色组织", u"分类", u"添加分类")
        reg_point("tinyms.view.termtaxonomy.update", u"角色组织", u"分类", u"修改分类")
        reg_point("tinyms.view.termtaxonomy.delete", u"角色组织", u"分类", u"删除分类")
        #角色管理
        reg_point("tinyms.entity.role.list", u"角色组织", u"角色", u"查看角色列表")
        reg_point("tinyms.entity.role.view", u"角色组织", u"角色", u"查看角色明细")
        reg_point("tinyms.entity.role.add", u"角色组织", u"角色", u"添加角色")
        reg_point("tinyms.entity.role.update", u"角色组织", u"角色", u"修改角色")
        reg_point("tinyms.entity.role.delete", u"角色组织", u"角色", u"删除角色")
        reg_point("tinyms.entity.role.points.view", u"角色组织", u"权限", u"查看角色权限点")
        reg_point("tinyms.entity.role.points.update", u"角色组织", u"权限", u"修改角色权限")
        #账户管理
        reg_point("tinyms.entity.account.list", u"角色组织", u"账户", u"查看账户列表")
        reg_point("tinyms.entity.account.view", u"角色组织", u"账户", u"查看账户明细")
        reg_point("tinyms.entity.account.add", u"角色组织", u"账户", u"添加账户")
        reg_point("tinyms.entity.account.update", u"角色组织", u"账户", u"修改账户")
        reg_point("tinyms.entity.account.delete", u"角色组织", u"账户", u"删除账户")
        reg_point("tinyms.entity.account.role.view", u"角色组织", u"账户", u"查看账户角色")
        reg_point("tinyms.entity.account.role.edit", u"角色组织", u"账户", u"为账户设置角色")
        #档案管理
        reg_point("tinyms.entity.archives.list", u"档案管理", u"人员", u"查看人员列表")
        reg_point("tinyms.entity.archives.view", u"档案管理", u"人员", u"查看人员明细")
        reg_point("tinyms.entity.archives.add", u"档案管理", u"人员", u"添加人员")
        reg_point("tinyms.entity.archives.update", u"档案管理", u"人员", u"修改人员")
        reg_point("tinyms.entity.archives.delete", u"档案管理", u"人员", u"删除人员")
        #档案管理
        reg_point("tinyms.entity.setting.system", u"系统设置", u"设置", u"全局设置")
        reg_point("tinyms.entity.setting.user", u"系统设置", u"设置", u"用户自定义设置")

        for cls in ObjectPool.user_security_points:
            obj = cls()
            if hasattr(obj, "reg"):
                obj.reg()
Esempio n. 2
0
    def reg(self):
        reg_point("tinyms.sidebar.validwork.main.show", "菜单", "侧边栏", "考勤系统")
        reg_point("tinyms.sidebar.validwork.sub.scheduletask.show", "菜单", "考勤", "任务计划")
        reg_point("tinyms.sidebar.validwork.sub.timeblock.show", "菜单", "考勤", "班次/时间段")
        reg_point("tinyms.sidebar.validwork.sub.fingertemplate.show", "菜单", "考勤", "指纹模版")
        reg_point("tinyms.sidebar.validwork.sub.askforleave.show", "菜单", "考勤", "请假")
        reg_point("tinyms.sidebar.validwork.sub.overtime.show", "菜单", "考勤", "加班")
        reg_point("tinyms.sidebar.validwork.sub.hodiday.show", "菜单", "考勤", "节日")
        reg_point("tinyms.sidebar.validwork.sub.machine.show", "菜单", "考勤", "考勤机管理")

        #任务计划
        reg_point("tinyms.validwork.entity.ValidWorkScheduleTask.list", "考勤", "任务计划", "查看任务计划列表")
        reg_point("tinyms.validwork.entity.ValidWorkScheduleTask.view", "考勤", "任务计划", "查看任务计划明细")
        reg_point("tinyms.validwork.entity.ValidWorkScheduleTask.add", "考勤", "任务计划", "添加任务计划")
        reg_point("tinyms.validwork.entity.ValidWorkScheduleTask.update", "考勤", "任务计划", "修改任务计划")
        reg_point("tinyms.validwork.entity.ValidWorkScheduleTask.delete", "考勤", "任务计划", "删除任务计划")
        reg_point("tinyms.validwork.entity.ValidWorkScheduleTask.TimeBlock.view", "考勤", "任务计划", "查看班次/时间段")
        reg_point("tinyms.validwork.entity.ValidWorkScheduleTask.TimeBlock.edit", "考勤", "任务计划", "编辑班次/时间段/任务计划")

        #班次/时间段
        reg_point("tinyms.validwork.entity.ValidWorkTimeBlock.list", "考勤", "班次/时间段", "查看任务计划列表")
        reg_point("tinyms.validwork.entity.ValidWorkTimeBlock.view", "考勤", "班次/时间段", "查看任务计划明细")
        reg_point("tinyms.validwork.entity.ValidWorkTimeBlock.add", "考勤", "班次/时间段", "添加任务计划")
        reg_point("tinyms.validwork.entity.ValidWorkTimeBlock.update", "考勤", "班次/时间段", "修改任务计划")
        reg_point("tinyms.validwork.entity.ValidWorkTimeBlock.delete", "考勤", "班次/时间段", "删除任务计划")

        #指纹模版
        reg_point("tinyms.validwork.entity.ValidWorkFingerTemplate.list", "考勤", "指纹模版", "查看指纹模版列表")
        reg_point("tinyms.validwork.entity.ValidWorkFingerTemplate.view", "考勤", "指纹模版", "查看指纹模版明细")
        reg_point("tinyms.validwork.entity.ValidWorkFingerTemplate.add", "考勤", "指纹模版", "添加指纹模版")
        reg_point("tinyms.validwork.entity.ValidWorkFingerTemplate.update", "考勤", "指纹模版", "修改指纹模版")
        reg_point("tinyms.validwork.entity.ValidWorkFingerTemplate.delete", "考勤", "指纹模版", "删除指纹模版")
        reg_point("tinyms.validwork.entity.ValidWorkFingerTemplate.edit", "考勤", "指纹模版", "指纹录入")

        #节日
        reg_point("tinyms.validwork.entity.Holiday.list", "考勤", "节日", "查看节日列表")
        reg_point("tinyms.validwork.entity.Holiday.view", "考勤", "节日", "查看节日明细")
        reg_point("tinyms.validwork.entity.Holiday.add", "考勤", "节日", "添加节日")
        reg_point("tinyms.validwork.entity.Holiday.update", "考勤", "节日", "修改节日")
        reg_point("tinyms.validwork.entity.Holiday.delete", "考勤", "节日", "删除节日")

        #请假
        reg_point("tinyms.validwork.entity.AskForLeave.list", "考勤", "请假", "查看请假列表")
        reg_point("tinyms.validwork.entity.AskForLeave.view", "考勤", "请假", "查看请假明细")
        reg_point("tinyms.validwork.entity.AskForLeave.add", "考勤", "请假", "添加请假")
        reg_point("tinyms.validwork.entity.AskForLeave.update", "考勤", "请假", "修改请假")
        reg_point("tinyms.validwork.entity.AskForLeave.delete", "考勤", "请假", "删除请假")

        #加班
        reg_point("tinyms.validwork.entity.Overtime.list", "考勤", "加班", "查看加班列表")
        reg_point("tinyms.validwork.entity.Overtime.view", "考勤", "加班", "查看加班明细")
        reg_point("tinyms.validwork.entity.Overtime.add", "考勤", "加班", "添加加班")
        reg_point("tinyms.validwork.entity.Overtime.update", "考勤", "加班", "修改加班")
        reg_point("tinyms.validwork.entity.Overtime.delete", "考勤", "加班", "删除加班")

        #考勤机管理
        reg_point("tinyms.validwork.entity.ValidWorkMachine.list", "考勤", "考勤机管理", "查看考勤机列表")
        reg_point("tinyms.validwork.entity.ValidWorkMachine.update", "考勤", "考勤机管理", "修改考勤机")

        #考勤报表
        reg_point("tinyms.validwork.report.DayReportView.list", "考勤", "报表", "日报表")
        reg_point("tinyms.validwork.report.MonthReportView.list", "考勤", "报表", "月报表")


        #启动任务分配管理器
        ValidWorkHelper.start_scheduler()