diff --git a/VERSION b/VERSION index bdaf50850f..c266afa36d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.6.1 +9.6.2 diff --git a/config/config.php b/config/config.php index 7d581f6279..cbc3fec152 100644 --- a/config/config.php +++ b/config/config.php @@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '9.6.1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '9.6.2'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. $config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. $config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. diff --git a/db/zentao.sql b/db/zentao.sql index ac1f0cf221..fbbb06241e 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -916,6 +916,7 @@ INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES (9, 'TOP', 'top', 'for top manager.'), (10, 'OTHERS', '', 'for others.'), (11, 'guest', 'guest', 'For guest'); +(12, 'limited', 'limited', 'For limited user'); INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1, 'action', 'editComment'), @@ -3289,4 +3290,5 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11, 'user', 'testCase'), (11, 'user', 'testTask'), (11, 'user', 'todo'), -(11, 'user', 'view'); +(11, 'user', 'view'), +(12, 'my', 'limited'); diff --git a/module/group/js/managepriv.js b/module/group/js/managepriv.js index e09acad56d..deca0b5f43 100644 --- a/module/group/js/managepriv.js +++ b/module/group/js/managepriv.js @@ -21,19 +21,7 @@ function setNoChecked() { var noCheckValue = ''; $(':checkbox').each(function(){ - if(!$(this).attr('checked') && $(this).next('span').attr('id') != undefined) noCheckValue = noCheckValue + ',' + $(this).next('span').attr('id'); + if(!$(this).prop('checked') && $(this).next('span').attr('id') != undefined) noCheckValue = noCheckValue + ',' + $(this).next('span').attr('id'); }) $('#noChecked').val(noCheckValue); } - -$(function() -{ - $("[name^='allchecker']").change(function() - { - var click = $(this).attr('onclick'); - if(click.indexOf('""') >= 0 || click.indexOf('"my"') >= 0) - { - $('#my-limited').closest('.group-item').find('input').prop("checked", false); - } - }) -}) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index c28883a448..b075352107 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -84,7 +84,6 @@ $lang->resource->my->changePassword = 'changePassword'; $lang->resource->my->unbind = 'unbind'; $lang->resource->my->manageContacts = 'manageContacts'; $lang->resource->my->deleteContacts = 'deleteContacts'; -$lang->resource->my->limited = 'limited'; $lang->resource->my->score = 'score'; $lang->my->methodOrder[0] = 'index'; @@ -103,7 +102,6 @@ $lang->my->methodOrder[60] = 'unbind'; $lang->my->methodOrder[65] = 'manageContacts'; $lang->my->methodOrder[75] = 'deleteContacts'; $lang->my->methodOrder[80] = 'score'; -$lang->my->methodOrder[85] = 'limited'; /* Todo. */ $lang->resource->todo = new stdclass(); diff --git a/module/group/model.php b/module/group/model.php index ab53cfafb2..3565b60128 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -407,4 +407,24 @@ class groupModel extends model } return $modules; } + + /** + * Judge an action is clickable or not. + * + * @param object $group + * @param string $action + * @static + * @access public + * @return bool + */ + public static function isClickable($group, $action) + { + $action = strtolower($action); + + if($action == 'manageview' and $group->role == 'limited') return false; + if($action == 'edit' and $group->role == 'limited') return false; + if($action == 'copy' and $group->role == 'limited') return false; + + return true; + } } diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php index b889dc78c9..e59dd4f05d 100644 --- a/module/group/view/browse.html.php +++ b/module/group/view/browse.html.php @@ -42,17 +42,21 @@