You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the weekend we tragged it down to the point where the post_deleteUser hook where not emitted because no function was connected to the hook, even if it is defined in /lib/public/share.php.
There was no changes in the sharing code in between. More or less at the same time create user starts failing too because of some routing problems therefore we assumed that both problem could have the same roots.
@bartv2 could you have a look if this problem has something to do with you latest changes in the routing code? Thanks!
I don't quite get why the calendar test fails. I've added another test in 57b3cfc689a55fc11aa73055909bb6779833d515 If that fails something is really wrong ;)
I don't see any reason for a developer using the Share API to need to know if all permissions are set or not. Adding/removing permissions is done by the sharing dropdown, so the only thing that a developer ever needs to check is if it is possible to edit/delete it.
I just see @tanghus wanting it for a test case, which isn't good enough of a reason.
@tanghus Now we're talking about using the sharing permissions outside of just shared items for your use case. This brings up if we should move the CRUDS permissions definitions outside of the Share API. No further comments here since it is unrelated to the issue, move to the mailing list if you want to continue.
Is probably to blame on me when I ported calendar app to the new sharing api. I'll have a look tomorrow.
Sorry, but I haven't had time to look at this. @georgehrke since you plan to change the Calendar sharing backend for OC 5, can we disable the array comparison test for now? I still haven't got autotest.sh working and spending hours on a test case that will likely be irrelevant soon doesn't feel very productive ;)
sorry, I have to re-open this issue again. It is still not fixed for the real-world run. The problem is not where the hooks are defined. I think it is OK to define hooks only if the app is enabled and loaded. If the app is not loaded we should also avoid to trigger the hooks.
The problem was introduced by this commit bb136b9#settings/ajax/removeuser.php which removes "require_once '../../lib/base.php';" for many ajax calls, including settings/ajax/removeuser.php and which took care of loading all enabled apps.
A simple fix could be to bring this code back (but for some reasons this no longer works for me, i get an php error that he can't open base.php) or to add a OC_App::loadApps() instead, like proposed by my early merge request. But as mentioned by @blizzz it would be good to have this on a more generic place so that we don't have to call this on every file. But the problem with a (too) generic place is that we would always load all apps, even if we don't need it (e.g. webdav access).
@schiesbn no problem, github closed it earlier then i expected. Was expecting the close to happen on the merge. But back to the issue, this is still about the share hooks not being run on removeUser? With the pull the hooks should always be registered with loading base.php. Can you check that the are really there?
The general location to have the apps loaded would be in OC::handleRequest before the router->match call. This won't effect webdav access, but for other actions that don't need hooks or all apps loaded it would be to much. But at least it will solve the regression with loading all apps.
But back to the issue, this is still about the share hooks not being run on removeUser? With the pull the hooks should always be registered with loading base.php. Can you check that the are really there?
Yes, but the problem is that base.php gets no longer loaded if you run removeUser, since the "require_once" was removed from the file. If we call base.php than it should work, also without moving the hooks from app.php to base.php because base.php takes care to load all necessary apps which than can register their hooks. I don't know why you removed the "required_once" statement from the ajax calls. But we need to find something which replaces it or ideally load it on a different more generic place which gets executed for every call. But than we have to take care to load only the apps we really need (e.g. for webdav calls we don't want to load the music player app but all logging apps and filesystem apps)
base.php is loaded, the url is .../index.php/settings/ajax/removeuser.php which loads index.php which loads lib/base.php which calls handleRequest which resolves the route (/settings/ajax/removeuser.php) and loads that file using actionInclude() function. So base.php is loaded and the sharing hooks are loaded there (in the pull).
The general location to have the apps loaded would be in OC::handleRequest before the router->match call.
sorry, my fault. I thought that your changes where already merged into master. Before I just tested master without checking the code. Now I tried your "share_hooks" branch. Looks good 👍
Activity
schiessle commentedon Oct 31, 2012
During the weekend we tragged it down to the point where the post_deleteUser hook where not emitted because no function was connected to the hook, even if it is defined in /lib/public/share.php.
There was no changes in the sharing code in between. More or less at the same time create user starts failing too because of some routing problems therefore we assumed that both problem could have the same roots.
@bartv2 could you have a look if this problem has something to do with you latest changes in the routing code? Thanks!
DeepDiver1975 commentedon Nov 5, 2012
@bartv2 Can you please have a look at this?
Because of the tests are breaking on git master all pull request tests are breaking as well.
Thanks a lot!
load all enabled apps to make sure that all hooks are triggered (issue …
diederikdehaas commentedon Nov 6, 2012
@DeepDiver1975 https://ci.tmit.eu/job/ownCloud-Server(master)/1265/testReport/ gives a 404 error
DeepDiver1975 commentedon Nov 6, 2012
@diederikdehaas you are right - the build has been thrown away :-(
diederikdehaas commentedon Nov 6, 2012
On Tuesday 06 November 2012 14:25:22 Thomas Müller wrote:
'luckily' they still fail on the current last build:
https://ci.tmit.eu/job/ownCloud-Server%28master%29/1311/testReport/
fmms commentedon Nov 6, 2012
To not loose them again here is the output of the failing test cases:
tanghus commentedon Nov 6, 2012
Is probably to blame on me when I ported calendar app to the new sharing api. I'll have a look tomorrow.
tanghus commentedon Nov 6, 2012
@MTGap Can we add an const PERMISSION_ALL = 31 to https://github.com/owncloud/core/blob/master/lib/public/share.php#L55 ?
MTGap commentedon Nov 6, 2012
No, permissions are a bitmask for a reason.
DeepDiver1975 commentedon Nov 6, 2012
@MTGap from an API convenience point of view it is perfectly okay to provide combined masks.
tanghus commentedon Nov 6, 2012
I don't quite get why the calendar test fails. I've added another test in 57b3cfc689a55fc11aa73055909bb6779833d515 If that fails something is really wrong ;)
tanghus commentedon Nov 6, 2012
Wrong repo owncloud-archive/apps@57b3cfc
MTGap commentedon Nov 6, 2012
I don't see any reason for a developer using the Share API to need to know if all permissions are set or not. Adding/removing permissions is done by the sharing dropdown, so the only thing that a developer ever needs to check is if it is possible to edit/delete it.
I just see @tanghus wanting it for a test case, which isn't good enough of a reason.
4 remaining items
MTGap commentedon Nov 6, 2012
@tanghus Now we're talking about using the sharing permissions outside of just shared items for your use case. This brings up if we should move the CRUDS permissions definitions outside of the Share API. No further comments here since it is unrelated to the issue, move to the mailing list if you want to continue.
tanghus commentedon Nov 9, 2012
I wrote:
Sorry, but I haven't had time to look at this. @georgehrke since you plan to change the Calendar sharing backend for OC 5, can we disable the array comparison test for now? I still haven't got autotest.sh working and spending hours on a test case that will likely be irrelevant soon doesn't feel very productive ;)
bartv2 commentedon Nov 11, 2012
This issue is now solved, with commit 04aa029.
schiessle commentedon Nov 12, 2012
This might fix the test, but it does not fix the issue for the real user. The sharing app is still not loaded when a user gets deleted.
schiessle commentedon Nov 14, 2012
sorry, I have to re-open this issue again. It is still not fixed for the real-world run. The problem is not where the hooks are defined. I think it is OK to define hooks only if the app is enabled and loaded. If the app is not loaded we should also avoid to trigger the hooks.
The problem was introduced by this commit bb136b9#settings/ajax/removeuser.php which removes "require_once '../../lib/base.php';" for many ajax calls, including settings/ajax/removeuser.php and which took care of loading all enabled apps.
A simple fix could be to bring this code back (but for some reasons this no longer works for me, i get an php error that he can't open base.php) or to add a OC_App::loadApps() instead, like proposed by my early merge request. But as mentioned by @blizzz it would be good to have this on a more generic place so that we don't have to call this on every file. But the problem with a (too) generic place is that we would always load all apps, even if we don't need it (e.g. webdav access).
bartv2 commentedon Nov 14, 2012
@schiesbn no problem, github closed it earlier then i expected. Was expecting the close to happen on the merge. But back to the issue, this is still about the share hooks not being run on removeUser? With the pull the hooks should always be registered with loading base.php. Can you check that the are really there?
The general location to have the apps loaded would be in OC::handleRequest before the router->match call. This won't effect webdav access, but for other actions that don't need hooks or all apps loaded it would be to much. But at least it will solve the regression with loading all apps.
schiessle commentedon Nov 14, 2012
Yes, but the problem is that base.php gets no longer loaded if you run removeUser, since the "require_once" was removed from the file. If we call base.php than it should work, also without moving the hooks from app.php to base.php because base.php takes care to load all necessary apps which than can register their hooks. I don't know why you removed the "required_once" statement from the ajax calls. But we need to find something which replaces it or ideally load it on a different more generic place which gets executed for every call. But than we have to take care to load only the apps we really need (e.g. for webdav calls we don't want to load the music player app but all logging apps and filesystem apps)
bartv2 commentedon Nov 14, 2012
base.php is loaded, the url is .../index.php/settings/ajax/removeuser.php which loads index.php which loads lib/base.php which calls handleRequest which resolves the route (/settings/ajax/removeuser.php) and loads that file using actionInclude() function. So base.php is loaded and the sharing hooks are loaded there (in the pull).
but this still needs to be fixed
schiessle commentedon Nov 14, 2012
sorry, my fault. I thought that your changes where already merged into master. Before I just tested master without checking the code. Now I tried your "share_hooks" branch. Looks good 👍