View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022224 | mantisbt | bugtracker | public | 2017-01-19 17:47 | 2022-05-16 08:53 |
Reporter | Mr.Bricodage | Assigned To | dregad | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.0.0 | ||||
Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
Summary | 0022224: Access Restrictions to "Print Reports", "CSV Export", "Excel Export" in view all bugs page | ||||
Description | Current Mantis version displays several options to export and print filtered bugs in view all bugs page, options displayed on top of bugs table. This kind of options should be displayed only to a restricted list of users based on user rights on each project, at least in my company. I see two solutions to restrict access to these options :
What is your opinion about these solutions? I tried to implement the plugin but I didn't found any plugin that is used to "hide" or "delete" information displayed by Mantis, only plugins that adds more information. My goal is to implement the functionality according to your wishes (with a minimum of help if plugin can be used) and post here or in github the implemented solution. Thanks for your help | ||||
Tags | No tags attached. | ||||
Are you aware that restricting access to those pages does not restrict users from getting the same information by using other ways? E.g. you could get the information by using the SOAP API or by using scripts to access "View Issue Details" page of all issues. |
|
Besides that.. in similar situations, that you may want to alter some of the screen elements, where there is not a provided hook by core or plugin events, you may use javascript to selectively hide or delete those elements. |
|
Yes, I am. My "rejected export access users" have no technical knowledge to use SOAP or scripts. And my goal is to hide "easy access" to unwanted export functions for non technical users (REPORTER). If they found an other way, their account deserve to be upgraded ;-) Maybe that CSV export and Excel Export should become plugins? Because XML Import / Export is configurable :
This is the behaviour that I need and imagine for Excel and CSV exports. I have no idea for Print Reports. Your throughts?
Thanks for the tip. That will be my solution if nothing can be done in core or (new) plugins. Regards |
|
Having a configurable threshold for users that can execute a export may be a convenient feature.
Massive export can be a long running process, even if the same info can be accesed by the users, limiting the export execution could be used by some admin in some situations. For example: preventing server overload or DOS requests for small servers. |
|
@atrol : did you change your mind with cproensa use case ? |
|
Change my mind? Isn't 0022224:0055237 true? |
|
you're right, wrong formulation, my mistake and my apologies. Are you in favor of adding this new configuration option ? |
|
I don't need it myself, but I see no reason why it should not be implemented. The options should not just prevent the display of the buttons, but also the access to the pages. So I would call the options Not sure if 3 separate options are needed, maybe one is enough. Something like |
|
I wasn't thinking in $g_print_report_threshold. I don't know if it falls in the same situation, if it can be easily used to output 1000s of issues at once.
I would define only one export threshold. |
|
Thanks for your responses. In hindsight, I'm not able to provide a good reason to hide "Print reports" option. I made the mistake to group print and export functions when I wrote the issue. I'll provide ASAP a PR with one configuration variable '$g_export_issues_threshold' that will be used to check user rights for Export Excel and Export CSV functionalities (display menus and access to pages). |
|
"Print reports" can easily be used to export all issues. |
|
I agree. My contribution (overview in 0022224:0055513) is based on last response from @cproensa :
Should I add a second threshold ($g_print_report_threshold ?) for "Print Reports" option ? Or use the same threshold for the 3 options? |
|
Has this issue been addressed ? |
|
In my opinion, a single threshold is sufficient. |
|
Picking this up where @Mr.Bricodage left off. For now, I have rebased his original work onto latest master - https://github.com/dregad/mantisbt/tree/pr1021. Will test and adapt the code in the coming days as time allows. |
|
Please see new PR https://github.com/mantisbt/mantisbt/pull/1810, replacing the original contribution by @Mr.Bricodage. |
|
MantisBT: master 267418c1 2022-05-16 05:55 Details Diff |
Add new configs to Workflow Thresholds page Issue 0022224 |
Affected Issues 0022224 |
|
mod - lang/strings_english.txt | Diff File | ||
mod - manage_config_work_threshold_page.php | Diff File | ||
mod - manage_config_work_threshold_set.php | Diff File | ||
MantisBT: master 20cd415e 2022-05-16 08:51 Committer: community Details Diff |
Restrict access to Export and Print Reports Adds 2 new config options to control access restrictions to these View Issues page functionalities: - CSV/Excel Export ($g_export_issues_threshold) - Print Reports ($g_print_reports_threshold) The default value for print_reports_threshold is UPDATER, to reduce the risk of denial of service attacks overloading the server via multiple concurrent executions of print_all_bug_page_word.php. This changes from earlier behavior, where access to this function was not restricted. Fixes 0022224, 0025492, PR https://github.com/mantisbt/mantisbt/pull/1810 |
Affected Issues 0022224, 0025492 |
|
mod - config_defaults_inc.php | Diff File | ||
mod - css/default.css | Diff File | ||
mod - csv_export.php | Diff File | ||
mod - docbook/Admin_Guide/en-US/config/misc.xml | Diff File | ||
mod - excel_xml_export.php | Diff File | ||
mod - lang/strings_english.txt | Diff File | ||
mod - manage_config_work_threshold_page.php | Diff File | ||
mod - manage_config_work_threshold_set.php | Diff File | ||
mod - print_all_bug_page.php | Diff File | ||
mod - print_all_bug_page_word.php | Diff File | ||
mod - view_all_inc.php | Diff File |