Skip to content
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

Transfer deprecated ajax files to appframework #39

Merged
merged 28 commits into from
Jul 25, 2017
Merged

Conversation

sualko
Copy link
Member

@sualko sualko commented Jul 21, 2017

I thought it's maybe a good idea to transfer all deprecated ajax files to the more common appframework structure. This way we maybe satisfy the app code checker someday 🤣.

@LEDfan I changed the casing of your controller and the folder, because I like camel-case more, but in some issue you said something about backwards-compatibility. Can you explain this more?

Tasks:

  • getSettings
  • externalApi
  • getTurnCredentials
  • getUsers
  • setAdminSettings
  • setUserSettings
  • filter exceptions in middleware
  • add tests
    • middleware
    • setting controller
    • external api controller

@sualko sualko added this to the 3.3.0 milestone Jul 21, 2017
@sualko sualko force-pushed the ajax-to-controller branch from 6d11261 to 7c1c9c6 Compare July 21, 2017 11:39
@sualko sualko added the WIP label Jul 21, 2017
@LEDfan
Copy link
Member

LEDfan commented Jul 21, 2017

@LEDfan I changed the casing of your controller and the folder, because I like camel-case more, but in some issue you said something about backwards-compatibility. Can you explain this more?

In Nextcloud 9 the camel-casing of the files and directories isn't supported, that's why the stable9 builds are failing: https://travis-ci.org/nextcloud/jsxc.nextcloud/jobs/256023865. This only is supported since PSR4 which was introduced in oC 9.1 (NC 10) see: https://mailman.owncloud.org/pipermail/devel/2016-May/002455.html and owncloud/core#24386 and an example for an app owncloud/announcementcenter#73

@LEDfan LEDfan mentioned this pull request Jul 21, 2017
@sualko
Copy link
Member Author

sualko commented Jul 21, 2017

So can we drop support for NC9? #40

@sualko sualko removed the WIP label Jul 24, 2017
@sualko sualko requested a review from LEDfan July 24, 2017 12:23
@sualko
Copy link
Member Author

sualko commented Jul 24, 2017

@MarcelWaldvogel The new API will be /api/v2/checkPassword, /api/v2/isUser and /api/v2/sharedRoster, but I need to run some tests.

@LEDfan please have a look at the code, because you have more experience. I bumped phpunit to 5.7 to get the new cool $this->getMock shortcut.

foreach($userGroup->getUsers() as $user) {
$uid = $user->getUID();

if(!$roster[$uid]) {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

🙈 this was probably my js background

namespace OCA\OJSXC;

class TimeLimitedToken {
public static function generateUser($node, $domain, $secret, $ttl = 60*60, $time) {
Copy link
Member

Choose a reason for hiding this comment

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

I guess the $time parameter was added later, the optional parameter should be at the end.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added it for testing.

@LEDfan
Copy link
Member

LEDfan commented Jul 24, 2017

Wow good job! I only have two remarks (see above).
And the code checker is also happy (maybe we should add it to travis too.)

@sualko
Copy link
Member Author

sualko commented Jul 25, 2017

maybe we should add it to travis too

That's a great idea. Maybe also https://codecov.io? See https://github.com/codecov/example-php.

@sualko sualko merged commit 19ff5d8 into master Jul 25, 2017
@sualko sualko deleted the ajax-to-controller branch July 25, 2017 11:01
@sualko
Copy link
Member Author

sualko commented Jul 25, 2017

Thanks for reviewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants