Skip to content

Fix remote.php routes for apps that are enabled for specific groups - #9962

Merged
LukasReschke merged 1 commit into
masterfrom
app-group-enable-remote
Nov 18, 2014
Merged

LukasReschke merged 1 commit into
masterfrom
app-group-enable-remote

Conversation

@icewind1991

Copy link
Copy Markdown
Contributor

Since checking if an app is enabled requires a user to be logged in we need to postpone those checks until after the *DAV auth is handled, to achieve this a sabre/dav plugin is provided for apps

See owncloud/contacts#563 and owncloud/calendar#502 for the app parts of this

cc @DeepDiver1975

@jancborchardt

Copy link
Copy Markdown
Contributor

@icewind1991 can you mention a few more people who should review this? Maybe @bantu @MorrisJobke or someone else knowledgeable about the code?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be $this->app - right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@icewind1991

Copy link
Copy Markdown
Contributor Author

ping @DeepDiver1975 @schiesbn @th3fallen @PVince81

(travis fails are the encryption ones)

@MorrisJobke

Copy link
Copy Markdown
Contributor

@icewind1991 You can ignore Travis for now. until the corresponding PR got merged.

Comment thread lib/private/app.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does checkUser do ? Can you add a doc comment ?

@icewind1991

Copy link
Copy Markdown
Contributor Author

ping @tomneedham

@icewind1991
icewind1991 force-pushed the app-group-enable-remote branch from 6a72fb5 to 03455e0 Compare August 28, 2014 15:27
@tomneedham

Copy link
Copy Markdown
Contributor

@icewind1991 What's the status here? Should I test or is this still in development? Atm this is breaking provisioning_api.

(cc @jnfrmarks)

@PVince81 PVince81 added this to the 2014-sprint-03-current milestone Sep 4, 2014
@PVince81

PVince81 commented Sep 4, 2014

Copy link
Copy Markdown
Contributor

@icewind1991 any update ?
I think this will conflict somehow with #10818 which I'd like to have merged first as it fixes an important regression.

Also like I said I'm confused by the $checkUser argument.
Is this PR trying to achieve part of what is done in #10818 ?

@icewind1991

Copy link
Copy Markdown
Contributor Author

It fixes a different problem than #10818 but has a similar approach, we should merge #10818 first and I'll rebase this afterwards

@icewind1991
icewind1991 force-pushed the app-group-enable-remote branch from 03455e0 to 6a39e2a Compare September 4, 2014 13:24
@icewind1991

Copy link
Copy Markdown
Contributor Author

Rebased, please review @tomneedham @DeepDiver1975 @PVince81

Comment thread public.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set incognito mode earlier and you should be able to get rid of that flag.

@icewind1991
icewind1991 force-pushed the app-group-enable-remote branch from 6a39e2a to 4d4c6f8 Compare September 11, 2014 14:38
@icewind1991

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 @PVince81 @th3fallen please review

@PVince81

Copy link
Copy Markdown
Contributor

Too bad we can't get rid of that extra $all parameter, but it seems to be necessary.
Going to test this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment to explain what this plugin does ?

When reading the name alone AppEnabledPlugin it isn't very clear. (I just saw the name alone in the calendar PR)
A better name would be CheckAppEnabledPlugin as this name is more explicit.

(sorry, I didn't notice initially)

@PVince81

Copy link
Copy Markdown
Contributor

The attached PRs work with this one.

I still feel uneasy about requiring external apps to add true to the calls of checkAppEnabled() but also cannot think of any better solution.
This needs to be documented in the app dev documentation.

@PVince81

Copy link
Copy Markdown
Contributor
  • remote.php works
  • public.php

@icewind1991 did you find an app to test the public.php change with ?

@craigpg craigpg modified the milestones: 2014-sprint-04-current, 2014-sprint-03 Sep 15, 2014
@PVince81

PVince81 commented Oct 9, 2014

Copy link
Copy Markdown
Contributor
  • test with LDAP + group membership + enable app for group to make sure that the "authentication" apps are loaded first and the enabled apps cache still reflects the latest/correct state

@PVince81

Copy link
Copy Markdown
Contributor

I tested public.php with a dummy hello world app I wrote: the public.php is always appearing, regardless of the logged in user or permissions, which is expected.

Also: tested with LDAP.

👍

@LukasReschke second review ? (also review owncloud/contacts#563 and owncloud/calendar#502)

@craigpg craigpg modified the milestones: 2014-sprint-06-current, 2014-sprint-05 Oct 12, 2014
@craigpg craigpg modified the milestones: 2014-sprint-07-current, 2014-sprint-06 Oct 27, 2014
@butonic

butonic commented Oct 29, 2014

Copy link
Copy Markdown
Contributor

@icewind1991 rebase please

@icewind1991
icewind1991 force-pushed the app-group-enable-remote branch from 6c5ba27 to 40c7f0e Compare October 29, 2014 15:54
@icewind1991

Copy link
Copy Markdown
Contributor Author

rebased

@PVince81

Copy link
Copy Markdown
Contributor

Needs a second reviewer. @LukasReschke maybe ?

@LukasReschke

Copy link
Copy Markdown
Contributor

Will do later.

Comment thread lib/private/app.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That parameter sounds somewhat spooky 👻 - Can we rename it to soemwhat more easily to understand?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it's also not very clear when should what be checked

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter is not a good idea at all. You should rather be adding a new method isInstalled() instead.

@LukasReschke

Copy link
Copy Markdown
Contributor

If the PHPDoc gets clarified then I'm okay with these changes.

@icewind1991
icewind1991 force-pushed the app-group-enable-remote branch from 40c7f0e to 7883ab2 Compare November 7, 2014 15:15
@icewind1991

Copy link
Copy Markdown
Contributor Author

Rebased on top of #12031 to remove the mess of the extra param to checkAppEnabled() and friends.

So we need to wait for #12031 before this can be merged

@craigpg craigpg modified the milestones: 2014-sprint-08-current, 2014-sprint-07 Nov 10, 2014
@icewind1991
icewind1991 force-pushed the app-group-enable-remote branch from 7883ab2 to 7cb12d4 Compare November 17, 2014 14:50
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@icewind1991

Copy link
Copy Markdown
Contributor Author

Rebased since #12031 is merged

@ghost

ghost commented Nov 17, 2014

Copy link
Copy Markdown

🚀 Test PASSed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/2721/
🚀 Test PASSed. 🚀

@LukasReschke

Copy link
Copy Markdown
Contributor

Fine 👍

LukasReschke added a commit that referenced this pull request Nov 18, 2014
Fix remote.php routes for apps that are enabled for specific groups
@LukasReschke
LukasReschke merged commit 944cd32 into master Nov 18, 2014
@MorrisJobke
MorrisJobke deleted the app-group-enable-remote branch November 18, 2014 09:08
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.