package Authorization_List is

    subtype Userid is String (1 .. 20);

    type Group is array (Natural range <>) of Userid;

    subtype Group_Range is Natural range 1 .. 20;

    -- The idea is to define a set of units in the
    -- units directory of a subsystem.  This can be
    -- done using the normal R1000 naming scheme with
    -- wildcards.  The list of userids in the USERS
    -- array are granted CHECK_OUT access to the
    -- list of UNITS.

    type Authorize_Group (Siz : Group_Range := 0) is
        record  
            View : String (1 .. 30);
            Units : String (1 .. 50);
            Users : Group (1 .. Siz);
        end record;

    type Authorization is array (Natural range <>) of Authorize_Group;


    Group_31 : constant Group := (1 => "RATIONAL            ",
                                  2 => "O427TWB             ",
                                  3 => "LUCKEY              ",
                                  4 => "DUPONT              ");
    Group_32 : constant Group := (1 => "RATIONAL            ",
                                  2 => "O427RJM             ",
                                  3 => "COOP4               ",
                                  4 => "LUCKEY              ",
                                  5 => "DUPONT              ");
    Group_33 : constant Group := (1 => "RATIONAL            ",
                                  2 => "SAIVES              ",
                                  3 => "JEANNEC             ",
                                  4 => "LUCKEY              ",
                                  5 => "DUPONT              ");
    Group_41 : constant Group := (1 => "RATIONAL            ",
                                  2 => "RICHK               ",
                                  3 => "LUCKEY              ",
                                  4 => "DUPONT              ");

    -- Search through the Master_Authorization table
    -- until access for the calling userid is granted.
    Master_Authorization : constant Authorization (1 .. 7) :=
       (1 => Authorize_Group'
                (Siz => Group_31'Length,
                 View => "Rela_31_working             ",
                 Units => "DB@                                               ",
                 Users => Group_31),
        2 => Authorize_Group'
                (Siz => Group_31'Length,
                 View => "Rela_31_working             ",
                 Units => "SQL@                                              ",
                 Users => Group_31),
        3 => Authorize_Group'
                (Siz => Group_32'Length,
                 View => "Rela_32_working             ",
                 Units => "MSG_@                                             ",
                 Users => Group_32),
        4 => Authorize_Group'
                (Siz => Group_32'Length,
                 View => "Rela_32_working             ",
                 Units => "Q_@                                               ",
                 Users => Group_32),
        5 => Authorize_Group'
                (Siz => Group_32'Length,
                 View => "Rela_32_working             ",
                 Units => "CMTS@                                             ",
                 Users => Group_32),
        6 => Authorize_Group'
                (Siz => Group_33'Length,
                 View => "Rela_33_working             ",
                 Units => "MSGM@                                             ",
                 Users => Group_33),
        7 => Authorize_Group'
                (Siz => Group_41'Length,
                 View => "Rela_41_working             ",
                 Units => "CAMS_ANOM@                                        ",
                 Users => Group_41));

end Authorization_List;