From 7783471cc3b288e4552bee3e7e0b2b6562dac614 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 28 Apr 2016 20:56:47 -0700 Subject: [PATCH] Move selectedPermissionsArray to helper, since it can be used by users as well --- app/Helpers/Helper.php | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 478462560b..1320e7aa43 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -278,4 +278,54 @@ class Helper return false; } + + /** + * Walks through the permissions in the permissions config file and determines if + * permissions are granted based on a $selected_arr array. + * + * The $permissions array is a multidimensional array broke down by section. + * (Licenses, Assets, etc) + * + * The $selected_arr should be a flattened array that contains just the + * corresponding permission name and a true or false boolean to determine + * if that group/user has been granted that permission. + * + * @author [A. Gianotto] [