示例#1
0
        private void ValidateIsSQLEditor()
        {
            /*
             * CQ adapter builds SQL query and sends it to CQ server to retrieve the CQ records for sync/migration
             *
             * SQL Editor
             * Perform all Active User tasks plus the following activity:
             *   Edit SQL for queries in the Rational ClearQuest client and build SQL statements for API calls in hooks.
             *
             * Attention: Security context is implemented in the SQL code that builds queries.
             *            A user who has the SQL Editor privilege can bypass the security context.
             */

            if (!CQWrapper.HasUserPrivilege(m_userSession, (int)CQConstants.UserPrivilegeMaskType._RAW_SQL_WRITER))
            {
                string userLoginName = CQWrapper.GetUserLoginName(m_userSession);
                throw new ClearQuestInsufficientPrivilegeException(userLoginName, CQConstants.UserPrivilegeMaskType._RAW_SQL_WRITER.ToString());
            }
        }