-
-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cacti 1.3.6 (develop branch) many duplicate options on user permisson settings #1388
Comments
That would appear to be a weathermap issue, not a cacti issue. However, I think there may still be a bug were if the realm isn't found, it still tries to display it (based on a quick glance at user_admin.php) |
I have two servers Cacti (develop-branch). On one plugin weathermap I constantly update and test from the develop branch. On the second server, I have not touched the plugin weathermap for a very long time. |
I have other plugins that I am constantly updated and they do not exhibit this issue. It's going to be something between the core code and the way he's creating his realms. But I have work to do so I can't really look into it too much right now 👎 |
I also have other plugins and there are no problems with them. The only thing that I sin yet, it's on the plugin THOLD. I updated it today and it turned out that way. |
So updating a plugin is duplicating the realms? |
Maybe. I can not repeat the bug. And I do not know why it happened. I now want to remove extra realm and then watch what happens. |
Well, your permissions are based on a realm. So, if you remove the newer realms, it should be OK. eg, keep the first realm matching the plugin and file. Remove the others. |
I think I see a problem. I decided to look. My suggested fix (not tesed): --- a/lib/plugins.php
+++ b/lib/plugins.php
@@ -672,7 +672,7 @@ function api_plugin_register_realm ($plugin, $file, $display, $admin = true) {
AND file = ?',
array($plugin, $file), false);
- if (!empty($exists)) {
+ if (empty($exists)) {
db_execute_prepared('INSERT INTO plugin_realms
(plugin, file, display)
VALUES (?, ?, ?)', |
@netniV you patch resolve problem |
Err, I updated the patch as I pasted the wrong one haha. The one I did paste wouldn't ever register a realm ergo no permissions EVER |
What do you mean? |
Let me tripple check it.. but Weathermaps IS spamming the register_realm function. See an update on the weathermaps issue. |
Well, it would appear that either works.
Smallest change is the removal of the ! but checking |
Yea, woops. |
Realm permissions can be duplicated due to develop branch lib/plugins.php logic issue
Okay, resolved. |
I'll have to update my sources now to reflect your change lol. |
Hello.
I have plugins Weathermap and after update code from develop branch I have some problem with settings:
And plugin tab not showing.
On cacti log:
The text was updated successfully, but these errors were encountered: