Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bestpractical/rt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2022-10-29Merge branch '5.0/log-sql-even-without-currentuser' into 5.0-trunksunnavy
2022-10-21Merge branch '5.0/asset-custom-roles' into 5.0-trunkJim Brandt
2022-10-19Relax requirements about role names to be unique for each lookup typesunnavy
2022-10-19Support custom roles for asset searchessunnavy
2022-10-19Show single custom role's name in the result message of adding memberssunnavy
This is for asset custom roles, tickets don't have this issue as the result message was customized in RT::Ticket already.
2022-10-19Clear old data when registering the whole custom rolessunnavy
RegisterRoles is used to refresh custom roles in RT::Interface::Web::MaybeRebuildCustomRolesCache, but previously it just updated enabled ones and wrongly ignored disabled/deleted ones. This commit updates the logic to remove existing custom roles first and then fill new data from scratch, which fixes the issue.
2022-10-19Exclude asset custom roles from ticket searchShawn M Moore
This covers both search builder and bulk update.
2022-10-19Add custom roles to assetsShawn M Moore
2022-10-19Add support for LookupType to custom rolesShawn M Moore
This allows custom roles to be reused for any object class, not just tickets and queues.
2022-10-19Allow RegisterLookupType to provide options besides just FriendlyNameShawn M Moore
We are going to add new options including "CreateGroupPredicate", "AppliesToObjectPredicate" and "Subgroup".
2022-10-19Factor out a LookupType role from CustomFieldsShawn M Moore
This will be added to CustomRoles to support custom roles on assets and other record types. This generalizes and deprecates /Admin/Elements/SelectCustomFieldLookupType in favor of a new /Admin/Elements/SelectLookupType. That way we can use it on the CustomRole Modify page
2022-10-19Abstract RT::Ticket::RoleAddresses so it can be used for assets too.Shawn M Moore
2022-10-19Add CustomRoleObj method for loading by GroupTypeShawn M Moore
With this we can easily go from the output of ->Roles to an RT::CustomRole object.
2022-09-28Allow default custom field values for more objectscraig kaiser
This change shows the default value option in the custom field admin page for more objects. Once set, the default is populated on the create page for these objects.
2022-09-15Merge branch '5.0/add-dashboard-list-to-email-cli' into 5.0-trunksunnavy
2022-09-15Support to specify dashboards for rt-email-dashboardsJason Crome
2022-09-14Fix LDAP filter string debug outputBlaine Motsinger
The filter variable in UserExists isn't a Net::LDAP::Filter obj so fails the as_string method. Additionally, search_filter is more correct since it contains the final constructed filter.
2022-09-03Merge branch '4.4-trunk' into 5.0-trunksunnavy
2022-09-02Encode content for textual "message/..." attachmentssunnavy
If $TreatAttachedEmailAsFiles is true, message-like attachments wouldn't be split into parts in RT database, in which case "OriginalContent" could return decoded strings(with utf-8 flag on), which "ContentAsMIME" doesn't like(it feeds OriginalContent to MIME::Body::Scalar) and could cause the following warning(when there are some non-ascii chars): Strings with code points over 0xFF may not be mapped into in-memory file handles Even worse, it dies if you stringify the returned MIME::Entity object: open body: Invalid argument at .../MIME/Entity.pm line 1897. This commit fixes the issue by encoding content accordingly.
2022-08-17Fix lifecycle warning messages: "actions" is the key name, not "action"sunnavy
2022-08-02Merge branch '5.0/add-samesite-cookie-options' into 5.0-trunkJim Brandt
2022-08-02Add a warning as a hint to RT developers about WebSecureCookiesJim Brandt
2022-08-01Tests require $WebSecureCookies=0Brian Conry
Because the tests don't use https to talk to the server they need WebSecureCookie set to 0.
2022-07-30Do not check acl when auto-setting core date fieldsEmmanuel Lacour
When using custom rights in lifecycles, a user with only a right such as "CloseTicket" should trigger the update of "Resolved" field without "ModifyTicket" right.
2022-07-29Rewind uploaded file after readingEmmanuel
$fh is a ref to the filehandle given by cgi. Hence if this method is called twice (it is if you installed RT::Extension::MandatoryOnTransition with Upload/Image CF support[1]) the second reading will return empty data because it starts at end of file. [1] - https://github.com/bestpractical/rt-extension-mandatoryontransition/pull/6
2022-07-29Log recorded SQL statements, even without CurrentUser5.0/log-sql-even-without-currentuserJason Crome
The RT CLI also calls this function, but may not provide a current user. This ensures statements still get logged without error.
2022-07-27Merge branch '4.4-trunk' into 5.0-trunksunnavy
2022-07-27Merge branch '5.0/format-strings-dont-need-html-structure-checked' into ↵Jim Brandt
5.0-trunk
2022-07-27Exempt some format strings from HTML::Gumbo structure checkBrian Conry
6c0cbbbd introduced an extra structure check for HTML aimed at allowing well-formed tables in email to be displayed in ticket history. RT also sends other types of HTML through the scrubber and HTML::Gumbo undoes some of the escaping applied by EscapeHTML, which is necessary for properly displaying apostrophes in column titles. This causes the Saved Search portlet titles to display incorrectly for titles with apostrophes. Add an optional parameter to skip the structure check for these cases where structure isn't an issue and the extra parse causes problems when modifying the content.
2022-07-22Merge branch '4.4/importer-no-auto-commit-handle-originalid' into 4.4-trunkJim Brandt
2022-07-22Refactor implementation of --no-auto-commit to support --originalidsunnavy
When importing with --originalid, we need to add ticket custom field values using RT API, which calls $RT::Handle->BeginTransaction in RT::CustomField::AddValueForObject. But if AutoCommit if off, the BeginTransaction would error out at least with MySQL: DBD::mysql::db begin_work failed: Already in a transaction This commit refactors code to not turn off AutoCommit globally, but adds an additional transaction for each data file, which implicitly turns off AutoCommit and is also compatible with other BeginTransaction calls.
2022-07-15Merge branch '4.4/create-user-default-name' into 4.4-trunksunnavy
2022-07-15Merge branch '5.0/allow-empty-html-cf-on-create' into 5.0-trunkJim Brandt
2022-07-14Merge branch '4.4/fix-queue-IsWatcher-docs' into 4.4-trunkJim Brandt
2022-07-14Fix docs on RT::Queue::IsWatcherBrian Conry
The documentation incorrectly states that it can check for the Type of Owner and Requestor, but the method cannot. The incorrect documentation was copied from RT::Ticket, which does have those Types.
2022-07-13Merge branch '5.0.3-releng' into 5.0-trunksunnavy
2022-07-13Allow empty search ResultPage parameter in URL5.0/allow-empty-search-result-pagesunnavy
RT could generate URLs with empty ResultPage(e.g. when building menus), which doesn't hurt as it falls back to "/Search/Result.html". In ba3a82144d we added validation of ResultPage, to avoid redirecting to arbitrary pages for security reasons. As empty ResultPage falls back safely, allowing it is totally fine. This is mainly to get rid of the following warning: ResultPage is not whitelisted, ignoring
2022-07-06Merge branch '5.0/document-owneremail-use' into 5.0-trunkJim Brandt
2022-07-06Update PSGI error page for RTSupportEmailBrian Conry
As part of the separation of duties from OwnerEmail.
2022-06-28Add SameSite to cookies from WebSameSiteCookiesBrian Conry
This change adds the SameSite option to RT's session cookies, with a default value of 'Lax', providing a reasonable amount of protection against CSRF attacks while still allowing most integrations of RT with other systems. It also provides a config option, WebSameSiteCookies to allow the value to be changed from the default. Current standards allow values of 'Strict', 'Lax', and 'None'. Any value other than these will cause a warning to be logged. Current standards also require the Secure option to be set on the cookie when using the 'None' value, so a warning is logged if 'None' is specified and WebSecureCookies isn't set.
2022-06-17Fix runtime error in SelfService Asset Display5.0/fix-selfservice-asset-display-actionsBrian Conry
Change 755042f6a99 moved the menu building logic from a mason component into a Perl module. As part of this conversion one instance of an RT::Interface::Web function call (Menu) wasn't converted into a method call on an appropriate object, triggering a runtime error when viewing /SelfService/Asset/Display.html. Fixes: I#37377
2022-06-17Merge branch 'security/4.4/ocfv-acl' into security/5.0.3-relengsunnavy
2022-06-17Merge branch 'security/4.4/ocfv-acl' into security/4.4.6-relengsunnavy
2022-06-17Merge branch 'security/5.0/cve-2022-25803' into security/5.0.3-relengsunnavy
2022-06-16Add SLA to args CreateTickets acceptsBrad Embree
2022-06-16Provide examples for CanonicalizeEmailAddress match and replace4.4/create-user-default-nameJim Brandt
The examples were in RT_Config.pm.in as comments. Move them into the POD to make it easier for users to find. Also remove the comment from code that mentions an example, but didn't actually have one.
2022-06-16Document default Name setting in RT::UserJim Brandt
2022-06-16Don't default Name to EmailAddress in LoadOrCreateByEmailJim Brandt
RT::User::Create defaults Name to EmailAddress if no Name is passed and it does so after EmailAddress has been processed by CanonicalizeEmailAddress. EmailAddress can be modified based on CanonicalizeEmailAddressMatch and CanonicalizeEmailAddressReplace settings, so this makes sure Name and EmailAddress get the same value. When LoadOrCreateByEmail defaults Name to EmailAddress before calling Create, Create uses the passed value. This can then result in different values for Name and EmailAddress. Remove the default setting from LoadOrCreateByEmail and let Create set the correct default, if needed.
2022-06-15Add ACL check to ObjectCustomFieldValuessunnavy
2022-06-13Merge branch '4.4-trunk' into 5.0-trunksunnavy