Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- null_rules, is_upr, ruls_dep = get_rules_by_view_mode()
- if null_rules:
- return None if self.ret_pos is True else []
- if contr is not None:
- is_upr = True if str(contr) == '-2' else False
- if is_upr is True:
- # ищем только по подразделению
- if dep_pos is not None:
- if ruls_dep is None: # все разрешено
- ruls_dep = '[' + str(dep_pos) + ']'
- elif str(dep_pos) in ruls_dep: # разрешено часть и текущее входитв разрещенные
- ruls_dep = '[' + str(dep_pos) + ']'
- else:
- return None if self.ret_pos is True else []
- else:
- if dep_pos is not None:
- if ruls_dep is None: # все разрешено
- ruls_dep = '[' + str(dep_pos) + ']'
- elif str(dep_pos) in ruls_dep: # разрешено часть и текущее входитв разрещенные
- ruls_dep = '[' + str(dep_pos) + ']'
- else:
- return None if self.ret_pos is True else []
- elif contr is not None and str(contr) != '-1':
- if ruls_dep is None: # все разрешено
- ruls_dep = '[' + str(contr) + ']'
- elif str(contr) in ruls_dep: # разрешено часть и текущее входитв разрещенные
- ruls_dep = '[' + str(contr) + ']'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement