Page MenuHomePhorge

D5685.1775208516.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5685.1775208516.diff

diff --git a/src/app/Console/Commands/Ldap/GroupCommand.php b/src/app/Console/Commands/Ldap/GroupCommand.php
new file mode 100644
--- /dev/null
+++ b/src/app/Console/Commands/Ldap/GroupCommand.php
@@ -0,0 +1,49 @@
+<?php
+
+namespace App\Console\Commands\Ldap;
+
+use App\Console\Command;
+use App\Support\Facades\LDAP;
+
+class GroupCommand extends Command
+{
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'ldap:group {action} {group}';
+
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = "Execute actions on the ldap backend for a group";
+
+ /**
+ * Execute the console command.
+ *
+ * @return mixed
+ */
+ public function handle()
+ {
+ $action = $this->argument('action');
+ $group = $this->getGroup($this->argument('group'));
+
+ if (!$group) {
+ $this->error("Group not found.");
+ return 1;
+ }
+
+ if ($action == "create") {
+ LDAP::createGroup($group);
+ }
+ if ($action == "update") {
+ LDAP::updateGroup($group);
+ }
+ if ($action == "delete") {
+ LDAP::deleteGroup($group);
+ }
+ }
+}

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 9:28 AM (19 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823157
Default Alt Text
D5685.1775208516.diff (1 KB)

Event Timeline