def can_with_columns(self, user, action, table, columns):
<EOL>global_data = self.rules.get('<STR_LIT:*>')<EOL>global_actions = self._parse_permission(global_data)<EOL>if global_actions and action in global_actions:<EOL><INDENT>available = list(columns)<EOL><DEDENT>else:<EOL><INDENT>available = []<EOL><DEDENT>table_data = self.rules.get(table)<EOL>table_actions = self._parse_permission(table_data)<EOL>if table_actions and action in table_actions:<EOL><INDENT>available = list(columns)<EOL><DEDENT>if type(table_data) == dict:<EOL><INDENT>for column in columns:<EOL><INDENT>column_actions = self._parse_permission(table_data.get(column))<EOL>if column_actions is not None:<EOL><INDENT>if action in column_actions:<EOL><INDENT>if column not in available:<EOL><INDENT>available.append(column)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if column in available:<EOL><INDENT>available.remove(column)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>for check in self.common_checks:<EOL><INDENT>if check[<NUM_LIT:0>] == table and action in check[<NUM_LIT:1>]:<EOL><INDENT>ret = check[-<NUM_LIT:1>](self, user, action, available)<EOL>if isinstance(ret, (tuple, set, list)):<EOL><INDENT>available = list(ret)<EOL><DEDENT>elif ret == '<STR_LIT:*>':<EOL><INDENT>available = list(columns)<EOL><DEDENT>elif ret is False:<EOL><INDENT>available = []<EOL><DEDENT>if not available: break<EOL><DEDENT><DEDENT>return available<EOL>
根据权限进行列过滤
注意一点，只要有一个条件能够通过权限检测，那么过滤后还会有剩余条件，最终就不会报错。
如果全部条件都不能过检测，就会爆出权限错误了。

:param user:
:param action: 行为
:param table: 表名
:param columns: 列名列表
:return: 可用列的列表