Browse Source

Fixed permissions for delete and purge

Edgard 6 years ago
parent
commit
8414f825de
1 changed files with 13 additions and 4 deletions
  1. 13 4
      inc/provider.class.php

+ 13 - 4
inc/provider.class.php

@@ -24,10 +24,19 @@ class PluginSinglesignonProvider extends CommonDBTM {
    protected $_resource_owner = null;
    protected $_resource_owner = null;
 
 
    public static function canCreate() {
    public static function canCreate() {
-      if (static::$rightname) {
-         return Session::haveRight(static::$rightname, UPDATE);
-      }
-      return false;
+      return static::canUpdate();
+   }
+
+   public static function canDelete() {
+      return static::canUpdate();
+   }
+
+   public static function canPurge() {
+      return static::canUpdate();
+   }
+
+   public static function canView() {
+      return static::canUpdate();
    }
    }
 
 
    // Should return the localized name of the type
    // Should return the localized name of the type