Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 602

Přidáno uživatelem Michal Kliment před téměř 15 roky(ů)

Zapocaty prace na lepsi kontrole prav techniku - rozdeleni certifikovanych techniku do deseti stupnu. Od ctvrteho stupne technici mohou editovat spravce zarizeni, od pateho vidi login/heslo pro zarizeni, od sesteho jej mohou editovat.

TODO: Rozdelit vsechny pristupove pravidla pro techniky, momentalne jsou vsechna krome vyse zminenych nastaveny na stupen 1.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php
'cash' => 'Pokladna',
'cash flow' => 'Peněžní tok',
'cash drawn' => 'Výběry hotovosti',
'certified engineers' => 'Certifikovaní technici',
'choose format of export' => 'Vyberte formát exportu',
'cloud' => 'Oblast',
'code' => 'Kód',
......
'editing of town' => 'Úprava města',
'editing of transfer' => 'Úprava převodu',
'editing of user' => 'Úprava uživatele',
'eighth-degree certified engineers' => 'Certifikování technici osmého stupně',
'email' => 'E-mail',
'email address' => 'emailová adresa',
'e-mail settings' => 'Nastavení e-mailu',
......
'fees have been successfully deducted' => 'Členské příspěvky byly úspěšně strženy.',
'fees have been successfully recounted' => 'Členské příspěvky byly úspěšně přepočítány.',
'fees have not been set!' => 'Členské příspěvky nebyly nastaveny!',
'fifth-degree certified engineers' => 'Certifikování technici pátého stupně',
'file' => 'Soubor',
'file type' => 'Typ souboru',
'file with bank transfer listing' => 'Soubor s bankovním výpisem',
'fill in at least one from prices' => 'Vyplňte alespoň jednu z cen.',
'filter' => 'Filtrovat',
'finances' => 'Finance',
'first-degree certified engineers' => 'Certifikovaní technici prvního stupně',
'first number can\'t be larger then second number' => 'První číslo nesmí být větší než druhé číslo',
'first or last day of month is not valid' => 'První nebo poslední den v měsíci není správně.',
'format' => 'Formát',
......
'forward dns' => 'Dopředné DNS',
'forward dns zone file was successfully generated' => 'Dopředný zónový soubor DNS byl úspěšně vygenerován',
'forward records' => 'Dopředné záznamy',
'fourth-degree certified engineers' => 'Certifikování technici čtvrtého stupně',
'frequence' => 'Frekvence',
'from/to' => 'Od/komu',
'from' => 'Od',
......
'new password' => 'Nové heslo',
'new transfer' => 'Nový převod',
'new transfer from account' => 'Nový převod z účtu',
'nineth-degree certified engineers' => 'Certifikování technici devátého stupně',
'no' => 'ne',
'nonactive' => 'Neaktivní',
'none' => 'žádný',
......
'save' => 'Uložit',
'save wireless setting' => 'Uložit bezdrátové nastavení',
'search' => 'Hledat',
'second-degree certified engineers' => 'Certifikovaní technici druhého stupně',
'secondary dns' => 'Sekundární DNS.',
'section' => 'Sekce',
'send' => 'Odeslat',
......
'service' => 'Služba',
'settings' => 'Nastavení',
'settings for configuration files has been successfully updated' => 'Nastavení pro kofigurační soubory bylo úspěšně upraveno',
'seventh-degree certified engineers' => 'Certifikování technici sedmého stupně',
'show' => 'Zobrazit',
'show all confirmed works' => 'Zobraz všechnny potvrzené práce',
'show all transfers on the account' => 'Ukaž všechny převody tohoto účtu',
......
'show works' => 'Zobrazit práce',
'signature of applicant member' => 'podpis žadatele - člena',
'signature and stamp' => 'Podpis a razítko',
'sixth-degree certified engineers' => 'Certifikování technici šestého stupně',
'smokeping menu parent' => 'Rodič v menu smokepingu',
'smokeping monitoring' => 'Monitorování smokepingem',
'smokeping record has been successfully added' => 'Záznam smokepingu byl úspěšně přidán',
......
'template has been successfully added' => 'Šablona byla úspěšně přidána.',
'template has been successfully updated' => 'Šablona byla úspěšně upravena.',
'template name' => 'Název šablony',
'tenth-degree certified engineers' => 'Certifikování technici desátého stupně',
'tertiary dns' => 'Terciární DNS.',
'the first bank account information' => 'Údaje o prvním bankovním účtu',
'the parsed account is unknown' => 'Parsovaný účet je neznámý',
'the transfer successfully done' => 'Převod úspěšně dokončen',
'there are no items yet' => 'Neobsahuje žádné záznamy.',
'third-degree certified engineers' => 'Certifikovaní technici třetího stupně',
'this account does not exist' => 'Tento účet neexistuje.',
'this month has been already deducted!' => 'Tento měsíc už byl stržen!',
'time' => 'Čas',
freenetis/trunk/kohana/application/controllers/access_rights.php
$count = $model_groups_aro_map->count_rows_by_group_id($group->id);
if ($group->id == 21)
$rows[$i + 1] = '<tr><td style="width:300px">'.$ret.url_lang::lang('texts.'.$group->name).'</td><td style="width:30px; text-align: center" >'.$count.'</td><td>'.url_lang::lang('texts.Edit').'</td></tr>';
$rows[$i + 1] = '<tr><td style="width:400px">'.$ret.url_lang::lang('texts.'.$group->name).'</td><td style="width:30px; text-align: center" >'.$count.'</td><td>'.url_lang::lang('texts.Edit').'</td></tr>';
else
$rows[$i + 1] = '<tr><td style="width:300px">'.$ret.url_lang::lang('texts.'.$group->name).'</td><td style="width:30px; text-align: center" >'.$count.'</td><td>'.html::anchor(url_lang::base().'access_rights/edit_group/'.$group->id,url_lang::lang('texts.Edit')).'</td></tr>';
$rows[$i + 1] = '<tr><td style="width:400px">'.$ret.url_lang::lang('texts.'.$group->name).'</td><td style="width:30px; text-align: center" >'.$count.'</td><td>'.html::anchor(url_lang::base().'access_rights/edit_group/'.$group->id,url_lang::lang('texts.Edit')).'</td></tr>';
$groups->next();
}
freenetis/trunk/kohana/application/controllers/devices.php
'use_selector' => false
));
if ($this->acl_check_new(get_class($this), 'admin', $member_id))
$grid_device_admins->add_new_button(url_lang::base()."device_admins/add/$device_id", url_lang::lang('texts.Add new device admin'));
$grid_device_admins->add_new_button(url_lang::base()."device_admins/edit/$device_id", url_lang::lang('texts.Add new device admin'));
$grid_device_admins->field('name')->label(url_lang::lang('texts.name'));
$grid_device_admins->field('surname')->label(url_lang::lang('texts.surname'));
$grid_device_admins->field('login')->label(url_lang::lang('texts.username'));
......
$form->input('trade_name')->label(url_lang::lang('texts.Trade name').':')->rules('length[1,50]');
$form->dropdown('type')->label(url_lang::lang('texts.Type').':')->options($types)->rules('required');
$form->checkbox('PPPoE_logging_in')->label(url_lang::lang('texts.PPPoE'))->value('1');
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,30]');
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,30]');
if ($this->acl_check_new(get_class($this),'login'))
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,30]');
if ($this->acl_check_new(get_class($this),'password'))
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,30]');
$form->input('GPS')->label(url_lang::lang('texts.GPS').':')->rules('length[3,100]')->value($selected_GPS);
$form->dropdown('street_id')->label(url_lang::lang('texts.street').':')->options($arr_streets)->selected($selected_street_id);
$form->input('street_number')->label(url_lang::lang('texts.street number').':')->rules('length[1,50]|valid_numeric')->value($selected_street_number);
......
$form->input('trade_name')->label(url_lang::lang('texts.Trade name').':')->rules('length[2,50]');
$form->dropdown('type')->label(url_lang::lang('texts.Type').':')->options($types)->rules('required');
$form->checkbox('PPPoE_logging_in')->label(url_lang::lang('texts.PPPoE').':')->value('1');
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,30]');
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,30]');
$form->input('GPS')->label(url_lang::lang('texts.GPS').':')->rules('length[3,100]')->value($selected_GPS);
if ($this->acl_check_new(get_class($this),'login'))
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,30]');
if ($this->acl_check_new(get_class($this),'password'))
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,30]');
$form->input('GPS')->label(url_lang::lang('texts.GPS').':')->rules('length[3,100]')->value($selected_GPS);
$form->dropdown('street_id')->label(url_lang::lang('texts.street').':')->options($arr_streets)->selected($selected_street_id);
$form->input('street_number')->label(url_lang::lang('texts.street number').':')->rules('length[1,50]|valid_numeric')->value($selected_street_number);
$form->dropdown('town_id')->label(url_lang::lang('texts.town').':')->rules('required')->options($arr_towns)->selected($selected_town_id);
......
$form->input('trade_name')->label(url_lang::lang('texts.Trade name').':')->rules('length[1,50]')->value($device->trade_name);
$form->dropdown('type')->label(url_lang::lang('texts.Type'))->options($types)->rules('required')->selected($device->type);
$form->checkbox('PPPoE_logging_in')->label(url_lang::lang('texts.PPPoE'))->value('1')->checked($device->PPPoE_logging_in);
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,30]')->value($device->login);
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,30]')->value($device->password);
if ($this->acl_check_edit(get_class($this),'login'))
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,30]')->value($device->login);
if ($this->acl_check_edit(get_class($this),'password'))
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,30]')->value($device->password);
$form->input('GPS')->label(url_lang::lang('texts.GPS').':')->rules('length[3,100]')->value($device->address_point->GPS);
$form->dropdown('street_id')->label(url_lang::lang('texts.street').':')->options($arr_streets)->selected($device->address_point->street_id);
$form->input('street_number')->label(url_lang::lang('texts.street number').':')->rules('length[1,50]|valid_numeric')->value($device->address_point->street_number);
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql.php
// array of sql queries that upgrade database
$upgrade_sql[get_SVN_rev()] = array(
"CREATE TABLE `clouds` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB
CHARACTER SET utf8 COLLATE utf8_general_ci;",
"UPDATE `aro_groups` SET `lft` = 1, `rgt` = '40' WHERE `aro_groups`.`id` = 21;",
"CREATE TABLE `cloud_admins` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`cloud_id` INTEGER UNSIGNED NOT NULL,
`admin_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB
CHARACTER SET utf8 COLLATE utf8_general_ci;",
"UPDATE `aro_groups` SET `lft` = 2, `rgt` = '37' WHERE `aro_groups`.`id` = 22;",
"ALTER TABLE `subnets` ADD COLUMN `cloud_id` INTEGER UNSIGNED AFTER `redirect`;",
"UPDATE `aro_groups` SET `lft` = 38, `rgt` = '39' WHERE `aro_groups`.`id` = 23;",
"UPDATE `aro_groups` SET `lft` = 9, `rgt` = '32' WHERE `aro_groups`.`id` = 26;",
"UPDATE `aro_groups` SET `lft` = 10, `rgt` = '31', `name` = 'First-degree certified engineers',
`value` = 'first_degree_certified_engineers' WHERE `aro_groups`.`id` = 29;",
"UPDATE `aro_groups` SET `lft` = 33, `rgt` = '34' WHERE `aro_groups`.`id` = 32;",
"UPDATE `aro_groups` SET `lft` = 35, `rgt` = '36' WHERE `aro_groups`.`id` = 33;",
"UPDATE `aro_groups` SET `lft` = 29, `rgt` = '30' WHERE `aro_groups`.`id` = 34;",
"INSERT INTO `aro_groups` (`id`, `parent_id`, `lft`, `rgt`, `name`, `value`) VALUES
(35, 29, 11, 28, 'Second-degree certified engineers', 'second_degree_certified_engineers'),
(36, 35, 12, 27, 'Third-degree certified engineers', 'third_degree_certified_engineers'),
(37, 36, 13, 26, 'Fourth-degree certified engineers', 'fourth_degree_certified_engineers'),
(38, 37, 14, 25, 'Fifth-degree certified engineers', 'fifth_degree_certified_engineers'),
(39, 38, 15, 24, 'Sixth-degree certified engineers', 'sixth_degree_certified_engineers'),
(40, 39, 16, 23, 'Seventh-degree certified engineers', 'seventh_degree_certified_engineers'),
(41, 40, 17, 22, 'Eighth-degree certified engineers', 'eighth_degree_certified_engineers'),
(42, 41, 18, 21, 'Nineth-degree certified engineers', 'nineth_degree_certified_engineers'),
(43, 42, 19, 20, 'Tenth-degree certified engineers', 'tenth_degree_certified_engineers');",
"DELETE FROM `axo_map` WHERE `axo_map`.`acl_id` = 49 AND CONVERT(`axo_map`.`section_value` USING utf8) = 'Devices_Controller' AND CONVERT(`axo_map`.`value` USING utf8) = 'admin' LIMIT 1;",
"INSERT INTO `acl` (`id`, `section_value`, `allow`, `enabled`, `return_value`, `note`, `updated_date`) VALUES ('68', 'user', '1', '1', '', 'First-degree certified engineers can only view admins of devices; they cannot edit them.', UNIX_TIMESTAMP());",
"INSERT INTO `aco_map` (`acl_id`, `section_value`, `value`) VALUES ('68', 'freenetis', 'view_all');",
"INSERT INTO `aro_groups_map` (`acl_id`, `group_id`) VALUES ('68', '29');",
"INSERT INTO `axo_map` (`acl_id`, `section_value`, `value`) VALUES ('68', 'Devices_Controller', 'admin');",
"INSERT INTO `acl` (`id`, `section_value`, `allow`, `enabled`, `return_value`, `note`, `updated_date`) VALUES ('69', 'user', '1', '1', '', 'Fourth-degree certified engineers can edit admins od devices.', UNIX_TIMESTAMP());",
"INSERT INTO `aco_map` (`acl_id`, `section_value`, `value`) VALUES
(69, 'freenetis', 'delete_all'),
(69, 'freenetis', 'edit_all'),
(69, 'freenetis', 'new_all'),
(69, 'freenetis', 'view_all');",
"INSERT INTO `aro_groups_map` (`acl_id`, `group_id`) VALUES ('69', '37');",
"INSERT INTO `axo_map` (`acl_id`, `section_value`, `value`) VALUES ('69', 'Devices_Controller', 'admin');",
"INSERT INTO `quimi_freenetis`.`acl` (`id`, `section_value`, `allow`, `enabled`, `return_value`, `note`, `updated_date`) VALUES ('70', 'user', '1', '1', '', 'Fifth-degress certified engineers can view logins and passwords of devices.', UNIX_TIMESTAMP());",
"INSERT INTO `aco_map` (`acl_id`, `section_value`, `value`) VALUES ('70', 'freenetis', 'view_all');",
"INSERT INTO `aro_groups_map` (`acl_id`, `group_id`) VALUES ('70', '38');",
"INSERT INTO `axo_map` (`acl_id`, `section_value`, `value`) VALUES
(70, 'Devices_Controller', 'login'),
(70, 'Devices_Controller', 'password');",
"INSERT INTO `acl` (`id`, `section_value`, `allow`, `enabled`, `return_value`, `note`, `updated_date`) VALUES ('71', 'user', '1', '1', '', 'Sixth-degrees certified engineers can add and edit logins and passwords of devices.', UNIX_TIMESTAMP('0'));",
"INSERT INTO `aco_map` (`acl_id`, `section_value`, `value`) VALUES
(71, 'freenetis', 'delete_all'),
(71, 'freenetis', 'edit_all'),
(71, 'freenetis', 'new_all'),
(71, 'freenetis', 'view_all');",
"INSERT INTO `aro_groups_map` (`acl_id`, `group_id`) VALUES ('71', '39');",
"INSERT INTO `axo_map` (`acl_id`, `section_value`, `value`) VALUES
(71, 'Devices_Controller', 'login'),
(71, 'Devices_Controller', 'password');",
"INSERT INTO `axo_map` (`acl_id`, `section_value`, `value`) VALUES
(38, 'Devices_Controller', 'login'),
(38, 'Devices_Controller', 'password');"
);
?>
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql_601.php
<?php
// array of sql queries that upgrade database
$upgrade_sql[601] = array(
"CREATE TABLE `clouds` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB
CHARACTER SET utf8 COLLATE utf8_general_ci;",
"CREATE TABLE `cloud_admins` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`cloud_id` INTEGER UNSIGNED NOT NULL,
`admin_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB
CHARACTER SET utf8 COLLATE utf8_general_ci;",
"ALTER TABLE `subnets` ADD COLUMN `cloud_id` INTEGER UNSIGNED AFTER `redirect`;",
);
?>
freenetis/trunk/kohana/application/views/devices_show.php
</tr>
</table>
<table class="extended" cellspacing="0" style="margin-left:25px; float:left;">
<tr>
<?php if ($this->acl_check_view(get_class($this),'login')): ?>
<tr>
<th><?php echo url_lang::lang('texts.Login name') ?></th>
<td><?php echo $device->login ?></td>
</tr>
<?php endif ?>
<?php if ($this->acl_check_view(get_class($this),'password')): ?>
<tr>
<th><?php echo url_lang::lang('texts.Password') ?></th>
<td><?php echo $device->password ?></td>
</tr>
<?php endif ?>
<tr>
<th><?php echo url_lang::lang('texts.Location address') ?></th>
<td><?php if ($device->address_point->street_id && $device->address_point->street_number) echo $device->address_point->street->street.' '.$device->address_point->street_number.', ';

Také k dispozici: Unified diff