Device group based access (#10568)

* Device group based access

* Use Permissions class to resolve permissions

Also give port access based on device access

* Convert more pages to use Permissions class

* shorten config setting name
use Eloquent relationships in several places
alphabetize config_definitions.json

* Change Models and Permissions

* Clean up ajax_search LIMIT sql

* Convert more pages to use Permissions class

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Jellyfrog
2019-12-30 12:11:26 +01:00
committed by GitHub
parent 1998b8dd00
commit b361710148
44 changed files with 402 additions and 252 deletions

View File

@@ -4,12 +4,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/**
@@ -32,7 +32,7 @@ $config['leaflet']['default_lat'] = 65.3258792;
$config['leaflet']['default_lng'] = 14.1115485;
Dag B <dag@bakke.com>
*/
$pagetitle[] = 'Geographical Map';
if (\LibreNMS\Config::get('map.engine') == 'leaflet') {
@@ -55,7 +55,7 @@ if (\LibreNMS\Config::get('map.engine') == 'leaflet') {
setStyle();
};
}, false);
function setStyle() {
if(isFullscreen) {
document.getElementsByClassName('navbar-fixed-top')[0].style.display = "none";
@@ -64,7 +64,7 @@ if (\LibreNMS\Config::get('map.engine') == 'leaflet') {
document.getElementsByClassName('navbar-fixed-top')[0].style.removeProperty("display");
document.getElementsByTagName('body')[0].style.paddingTop = "50px";
};
};
};
window.dispatchEvent(new Event('resize'));
</script>