View | Details | Raw Unified | Return to bug 39190
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_35761-add_SFTP_tables_and_perm.pl (-6 / +6 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number  => "35761",
4
    bug_number  => "35761",
5
    description => "Add new table and permission for generalised SFTP",
5
    description => "Add new table and permission for generalised file transports",
6
    up          => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
Lines 10-24 return { Link Here
10
        $dbh->do(
10
        $dbh->do(
11
            q{
11
            q{
12
                INSERT IGNORE INTO permissions (module_bit, code, description)
12
                INSERT IGNORE INTO permissions (module_bit, code, description)
13
                VALUES (3, 'manage_sftp_servers', 'Manage FTP/SFTP servers configuration');
13
                VALUES (3, 'manage_file_transports', 'Manage file transports configuration');
14
            }
14
            }
15
        );
15
        );
16
        say $out "Added new manage_sftp_servers permission";
16
        say $out "Added new permission 'manage_file_transports'";
17
17
18
        unless ( TableExists('sftp_servers') ) {
18
        unless ( TableExists('file_transports') ) {
19
            $dbh->do(
19
            $dbh->do(
20
                q {
20
                q {
21
                    CREATE TABLE `sftp_servers` (
21
                    CREATE TABLE `file_transports` (
22
                    `id` int(11) NOT NULL AUTO_INCREMENT,
22
                    `id` int(11) NOT NULL AUTO_INCREMENT,
23
                    `name` varchar(80) NOT NULL,
23
                    `name` varchar(80) NOT NULL,
24
                    `host` varchar(80) NOT NULL DEFAULT 'localhost',
24
                    `host` varchar(80) NOT NULL DEFAULT 'localhost',
Lines 38-44 return { Link Here
38
                    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
38
                    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
39
                }
39
                }
40
            );
40
            );
41
            say $out "Added new sftp_servers table";
41
            say $out "Added new table 'file_transports";
42
        }
42
        }
43
    },
43
    },
44
};
44
};
(-)a/installer/data/mysql/kohastructure.sql (-3 / +3 lines)
Lines 5967-5979 CREATE TABLE `sessions` ( Link Here
5967
/*!40101 SET character_set_client = @saved_cs_client */;
5967
/*!40101 SET character_set_client = @saved_cs_client */;
5968
5968
5969
--
5969
--
5970
-- Table structure for table `sftp_servers`
5970
-- Table structure for table `file_transports`
5971
--
5971
--
5972
5972
5973
DROP TABLE IF EXISTS `sftp_servers`;
5973
DROP TABLE IF EXISTS `file_transports`;
5974
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5974
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5975
/*!40101 SET character_set_client = utf8 */;
5975
/*!40101 SET character_set_client = utf8 */;
5976
CREATE TABLE `sftp_servers` (
5976
CREATE TABLE `file_transports` (
5977
  `id` int(11) NOT NULL AUTO_INCREMENT,
5977
  `id` int(11) NOT NULL AUTO_INCREMENT,
5978
  `name` varchar(80) NOT NULL,
5978
  `name` varchar(80) NOT NULL,
5979
  `host` varchar(80) NOT NULL DEFAULT 'localhost',
5979
  `host` varchar(80) NOT NULL DEFAULT 'localhost',
(-)a/installer/data/mysql/mandatory/userpermissions.sql (-3 / +2 lines)
Lines 39-45 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
39
   ( 3, 'manage_additional_fields', 'Add, edit, or delete additional custom fields for baskets or subscriptions (also requires order_manage or edit_subscription permissions)'),
39
   ( 3, 'manage_additional_fields', 'Add, edit, or delete additional custom fields for baskets or subscriptions (also requires order_manage or edit_subscription permissions)'),
40
   ( 3, 'manage_keyboard_shortcuts', 'Manage keyboard shortcuts for the advanced cataloging editor'),
40
   ( 3, 'manage_keyboard_shortcuts', 'Manage keyboard shortcuts for the advanced cataloging editor'),
41
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
41
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
42
   ( 3, 'manage_sftp_servers', 'Manage FTP/SFTP servers configuration'),
42
   ( 3, 'manage_file_transports', 'Manage file transports configuration'),
43
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
43
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
44
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
44
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
45
   ( 3, 'manage_search_filters', 'Manage custom search filters'),
45
   ( 3, 'manage_search_filters', 'Manage custom search filters'),
Lines 167-170 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
167
   (25, 'takepayment', 'Access the point of sale page and take payments'),
167
   (25, 'takepayment', 'Access the point of sale page and take payments'),
168
   (26, 'manage_problem_reports', 'Manage OPAC problem reports'),
168
   (26, 'manage_problem_reports', 'Manage OPAC problem reports'),
169
   (27, 'manage_recalls', 'Manage recalls for patrons')
169
   (27, 'manage_recalls', 'Manage recalls for patrons')
170
;
170
;
171
- 

Return to bug 39190