示例#1
0
        private static string BuildActionSQL(string strAction, GranteeMeta gtMeta)
        {
            StringBuilder strActionSQL = new StringBuilder();

            strActionSQL.Append(strAction);
            strActionSQL.Append(' ');

            strActionSQL.Append(Delimiter.ToString(gtMeta.ObjPermissions));
            strActionSQL.Append(' ');
            strActionSQL.Append(KWD.ON);
            strActionSQL.Append(' ');
            strActionSQL.Append(gtMeta.Object);
            strActionSQL.Append(' ');
            strActionSQL.Append(KWD.TO);
            strActionSQL.Append(' ');
            strActionSQL.Append(Delimiter.ToString(gtMeta.GranteeList));

            return(strActionSQL.ToString());
        }
示例#2
0
 public string BuildRevokeSQL(GranteeMeta gtMeta)
 {
     return(BuildActionSQL(KWD.DENY, gtMeta));
 }
示例#3
0
 // "GRANT SELECT ON dbo.V_xxx_Fields TO xxxUsers"
 // "GRANT EXECUTE ON dbo.ssp_IsRowHotFactedByUser TO xxxTrustedUsers"
 public string BuildGrantSQL(GranteeMeta gtMeta)
 {
     return(BuildActionSQL(KWD.GRANT, gtMeta));
 }