@@ -257,6 +257,22 @@ shellmatta_retCode_t shellmatta_addCmd(shellmatta_handle_t handle, shellmatta_cm
tempCmd = tempCmd->next;
}
+
+#ifdef SHELLMATTA_AUTHENTICATION
+ /** -# append permissions to added command if any */
+ if (inst->permList)
+ {
+ /** -# Search for command in perm list */
+ for (uint32_t i = 0u; i < inst->permListLength; i++)
+ if (0 == strcmp(cmd->cmd, inst->permList[i].cmd))
+ cmd->authLink = &inst->permList[i];
+ break;
+ }
+#endif
else
{