Bug 485748 - Feature Request -- Ability to hide format button through the prefs file
Feature Request -- Ability to hide format button through the prefs file
Status: CLOSED WORKSFORME
Product: Dogtag Certificate System
Classification: Community
Component: ESC (Show other bugs)
1.1
All Windows
urgent Severity high
: ---
: ---
Assigned To: Jack Magne
Chandrasekar Kannan
:
Depends On:
Blocks: 443788
  Show dependency treegraph
 
Reported: 2009-02-16 12:26 EST by Sean Veale
Modified: 2015-01-04 18:36 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-10 10:10:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Diff of orginal esc.js to proposed esc.js that adds the option to hide the format button (3.64 KB, text/plain)
2009-02-16 12:29 EST, Sean Veale
no flags Details
Modified ESC.js file that adds functionality to hide the format button (109.00 KB, application/x-javascript)
2009-02-16 12:30 EST, Sean Veale
no flags Details
Patch to quickly implement the hide format functionality. (1.24 KB, patch)
2009-02-26 17:43 EST, Jack Magne
no flags Details | Diff
Same patch with more context. (2.55 KB, patch)
2009-02-26 17:47 EST, Jack Magne
no flags Details | Diff

  None (edit)
Description Sean Veale 2009-02-16 12:26:16 EST
Description of problem:

I'd like the ability to be able to shown/hide the prefs file. I don't want to give the users the ability to format tokens if for some reason they know there ldap user name and password.



Additional info:

I'm attaching a diff off esc.js that adds this functionatality. I.e. it adds support for esc.hide.format where the parameter is yes. Setting it to any other text, including no, or not having the pref set enables the format button as is the default today. 

I'd also like to add the modified esc.js file, but I only seem to be able to add one attachment.
Comment 1 Sean Veale 2009-02-16 12:29:11 EST
Created attachment 332062 [details]
Diff of orginal esc.js to proposed esc.js that adds the option to hide the format button

Diff of the original esc.js to the modified one that adds this functionality. Not I used the source formatting that was already in the file instead of the posted one to keep it consistent. Namely around formatting an if statement.
Comment 2 Sean Veale 2009-02-16 12:30:21 EST
Created attachment 332063 [details]
Modified ESC.js  file that adds functionality to hide the format button
Comment 3 Jack Magne 2009-02-16 13:19:04 EST
Thanks. Will take a look!
Comment 4 Jack Magne 2009-02-26 17:43:53 EST
Created attachment 333404 [details]
Patch to quickly implement the hide format functionality.

Without looking at the original patches , I implemented this patch to provide this functionality.
Comment 5 Jack Magne 2009-02-26 17:47:10 EST
Created attachment 333405 [details]
Same patch with more context.
Comment 6 Matthew Harmsen 2009-02-26 18:07:47 EST
attachment (id=333405) +mharmsen
Comment 7 Jack Magne 2009-02-26 18:30:52 EST
Checking in ESC.js;
/cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v  <--  ESC.js
new revision: 1.20; previous revision: 1.19
done
Comment 8 Jack Magne 2009-02-26 22:10:14 EST
This feature can be operated by setting the following:

esc/defaults/preferences/esc-prefs.js


pref("esc.hide.format","yes");

Have it set to "no" to have ESC show the Format button as normal.
Note: This parameter also suppresses the "Format" menu item that shows up in the pop up menu for each token.

Note You need to log in before you can comment on or make changes to this bug.