(self, obj_str)
Generate GRANT for one section / one object type in section
Generate GRANT for one section / one object type in section
Generate GRANT for one section / one object type in section
def gen_one_type(self, obj_str):
        "Generate GRANT for one section / one object type in section"

        for u in self.user_list:
            self.gen_one_subj(u, u, obj_str)
        for g in self.group_list:
            self.gen_one_subj(g, "group " + g, obj_str)

        # if there was any seq perms, generate grants
        if len(self.seq_allowed) > 0:
            seq_str = ", ".join(self.seq_list)
            subj_str = ", ".join(self.seq_allowed)
            if self.seq_usage:
                cmd = "GRANT usage ON SEQUENCE %s\n  TO %s;"
            else:
                cmd = "GRANT select, update ON %s\n  TO %s;"
            print cmd % (seq_str, subj_str)
def gen_one_type ( self , obj_str ) : for u in self . user_list : self . gen_one_subj ( u , u , obj_str ) for g in self . group_list : self . gen_one_subj ( g , "group " + g , obj_str ) # if there was any seq perms, generate grants if len ( self . seq_allowed ) > 0 : seq_str = ", " . join ( self . seq_list ) subj_str = ", " . join ( self . seq_allowed ) if self . seq_usage : cmd = "GRANT usage ON SEQUENCE %s\n  TO %s;" else : cmd = "GRANT select, update ON %s\n  TO %s;" print cmd % ( seq_str , subj_str )