Opened 9 years ago

Closed 9 years ago

#1756 closed enhancement (fixed)

"New Ticket" fails with an unhelpful error message

Reported by: sjl Owned by:
Priority: major Milestone: ongoing
Version: Keywords: admin
Cc:

Description

With a newly created account, "New Ticket" fails with "unsufficient privileges". When creating the account, the only documentation about e-mail address is that it can be used to recover from a forgotten password. The UI should probably mention in both places (in the error message and in the account creation) that the e-mail address needs to be verified before tickets can be submitted.

Change History (3)

comment:1 Changed 9 years ago by dustin

It looks like http://trac.edgewall.org/wiki/TracInterfaceCustomization is the thing to use here.

comment:2 Changed 9 years ago by dustin

  • Keywords admin added; trac removed
  • Milestone changed from undecided to ongoing
  • Type changed from undecided to enhancement

comment:3 Changed 9 years ago by dustin

  • Resolution set to fixed
  • Status changed from new to closed

I've added this text to the site.html:

  <!--! bug #1756 - annotate the registration form with better email instructions -->
  <p py:match="div[@id='content' and @class='register']/form/fieldset[1]/div[4]/p" py:attrs="select('@*')">        <b style='color: red'>IMPORTANT:</b> Because of severe spam problems, this site        requires a validated email address before you can create a new ticket.  Trac
        will send you a verification token, which you will need to enter on the site.
        I'm sorry for the inconvenience, but please know that (non-spam) tickets are
        taken very seriously and are an important part of making Buildbot better.
  </p>

  <!--! bug #1756 - annotate /newticket when it displays an error, indicating
        that the user's email must be validated, and add a note about Captcha above
        the 'Create Ticket' button -->
  <p py:match="div[@id='content' and @class='error']/p[@class='message']" py:attrs="select('@*')">
    ${select('*|text()')}
    <py:if test="req.environ['PATH_INFO'] == '/newticket' and (not 'preview' in req.args)">
      <br/><b>HINT:</b> have you verified your email address?  You cannot create tickets until you have done so.
    </py:if>
  </p>
  <div py:match="div[@id='content' and @class='ticket']//div[@class='buttons']" py:attrs="select('@*')">
    ${select('*|text()')} <br/>
    <span style='font-size: 75%'>(note that you may be required to complete a CAPTCHA if you have submitted several tickets)</span>
  </div>

So the registration form has a fairly long note on it; the /newticket error page has a "HINT"; and the successful /newticket page mentions that a CAPTCHA may be required.

Now that I know how to do this, I should be able to make other tweaks as requested. My XPath isn't so hot, so suggestions are welcome.

Note: See TracTickets for help on using tickets.