Commit Graph

164 Commits

Author SHA1 Message Date
Brion Vibber d09aa9c947 Workaround for bug causing fatal error during favoriting; Profile::getCurrentNotice() was returning an ArrayList instead of a Notice directly due to pulling through Profile::getNotices(). This caused failure in Fave::addNew() which specifies it wants a Notice. Caused failure of the 'fav' IM command. 2011-03-01 17:01:35 -08:00
Zach Copley b7d0746694 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/emailsettings.php
	actions/hostmeta.php
	actions/imsettings.php
	actions/login.php
	actions/profilesettings.php
	actions/showgroup.php
	actions/smssettings.php
	actions/urlsettings.php
	actions/userauthorization.php
	actions/userdesignsettings.php
	classes/Memcached_DataObject.php
	index.php
	lib/accountsettingsaction.php
	lib/action.php
	lib/common.php
	lib/connectsettingsaction.php
	lib/designsettings.php
	lib/personalgroupnav.php
	lib/profileaction.php
	lib/userprofile.php
	plugins/ClientSideShorten/ClientSideShortenPlugin.php
	plugins/Facebook/FBConnectSettings.php
	plugins/Facebook/FacebookPlugin.php
	plugins/NewMenu/NewMenuPlugin.php
	plugins/NewMenu/newmenu.css
2011-02-28 15:39:43 -08:00
Zach Copley 17176ee445 Merge branch 'json-activities' into 0.9.x 2011-02-25 00:15:26 -08:00
Evan Prodromou f743a233ab Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2011-02-21 16:36:12 -05:00
Evan Prodromou 1525acdca1 Extend authorization framework to cover login and API use
I've extended the rights framework (centering on the Right class and Profile::hasRight()) to cover
Web login and API use. This will make it possible to prevent login and API use by users.

I added two new Right constants to the Right class: WEBLOGIN and API. I check these rights using
Profile::hasRight() when initializing users. If the rights check fails, I throw an exception.

I created a new AuthorizationException class for this particular
exception, in order to allow a different UI for these kinds of exceptions (or whatever).
2011-02-21 10:20:42 -05:00
Zach Copley 29ce5dd19a Reinstate profile_info in author/actor 2011-02-17 19:02:57 -08:00
Brion Vibber 98b1fe07c6 Blow user:site_owner cache when granting/revoking 'owner' role 2011-02-17 16:46:08 -08:00
Brion Vibber 454a980bd4 Fix for failure/exception on subscription/subscriber lists when deleted profiles are stuck in cached list.
Workaround for deleted profiles still appearing in cached subscriptions/subscribers lists: if we couldn't fetch them, don't include them in the ArrayWrapper.
ArrayWrapper doesn't deal well with null entries, which aren't meant to happen in how it works. This code has recently changed from dying directly with a PHP fatal error in that case to throwing an exception, which allows tracking down the caller.

It looks like there might be some cases where profiles and their matching subscriptions get deleted, but the subscription entries don't get properly cleared from cache... that still bears further investigation. The regular code path looks ok; calls Subscription::cancel() from code called in Profile::delete(); but if they're batch-deleted instead of one row at a time, that could fail to trigger.
2011-02-11 13:21:53 -08:00
Zach Copley df19e88323 Atom output - Reinstate activity:actor and activity:subject
w/deprecation warnings. Also add statusnet:profile_info back into
author/actor.
2011-02-09 23:18:14 -08:00
Brion Vibber e211e6228d Merge branch '0.9.x' into 1.0.x 2010-12-28 11:38:34 -08:00
Brion Vibber 90c7ff1983 Merge branch 'master' into 0.9.x 2010-12-28 11:37:38 -08:00
Brion Vibber d3d9797496 Prevent group creation by silenced users.
* adds Right::CREATEGROUP
* logic in Profile::hasRight() checks for silencing
* NewgroupAction checks for the permission before letting you see or process the form in the UI
* User_group::register() logic does a low-level check on the specified initial group admin, and rejects creation if that user doesn't have the right; guaranteeing that API methods etc will also have this restriction applied sensibly.
2010-12-28 11:34:02 -08:00
Brion Vibber 26baad63f2 Merge branch '0.9.x' into 1.0.x 2010-12-22 15:25:38 -08:00
Evan Prodromou 9a6ceb3303 Merge branch 'righttoleave' into 0.9.x 2010-12-22 11:22:51 -08:00
Brion Vibber d8a3a88ec8 Merge branch '0.9.x' into 1.0.x
Conflicts:
	classes/Memcached_DataObject.php
2010-12-17 17:13:21 -08:00
Brion Vibber 4adf551f9f Update sorting for user tagged timelines (indexing was bad before and remains bad -- we need some DB changes to make this one nice) 2010-12-17 13:45:40 -08:00
Brion Vibber 4cd3a0756b Update notice sorting for profile streams; extract more common code to Notice::addSinceId() and Notice::addMaxId() 2010-12-17 13:20:38 -08:00
Brion Vibber bf20258f4b Merge branch '0.9.x' into 1.0.x 2010-12-15 11:59:31 -08:00
Evan Prodromou 75aaa98462 define rights for account maintenance and default rules 2010-12-13 16:28:32 -05:00
Zach Copley bb55784e90 Move getConnectedApps() from Profile to User, where it belongs 2010-12-12 17:37:42 -08:00
Evan Prodromou 7285bbc93b Subscription stream functions
Made two new functions, Subscription::bySubscriber() and
Subscription::bySubscribed(), to get streams of Subscription objects.

Converted Profile::getSubscribers() and Profile::getSubscriptions() to
use these functions.
2010-12-11 10:24:46 -05:00
Brion Vibber 9df856e667 Merge branch '0.9.x' into merge
Conflicts:
	README
	actions/hostmeta.php
	classes/File_redirection.php
	lib/common.php
	lib/designsettings.php
	lib/router.php
	lib/util.php
	lib/xmppmanager.php
	plugins/OStatus/OStatusPlugin.php
2010-12-07 10:50:05 -08:00
Brion Vibber 407663fb40 Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x 2010-11-19 12:44:43 -08:00
Brion Vibber 4b01dd8b2e Ticket #2441: fix deletion of avatars when a profile is deleted.
Code was doing a batch call to $avatar->delete() which fails to properly engage the file deletion code. Calling the existing profile->delete_avatars() function deletes them individually, which makes it all work nice again.
2010-11-19 12:40:18 -08:00
Brion Vibber e4eb3b3dfd Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x 2010-11-15 17:36:48 -08:00
Brion Vibber 0d0e51292d some User -> Profile cleanup to help in adapting the profile page action to show stuff for remote users. Subscriptions, groups, roles, etc are all on profiles now so go ahead and use em. 2010-11-15 15:32:57 -08:00
Brion Vibber b716d01a41 Merge branch '0.9.x' into 1.0.x 2010-11-03 16:09:49 -07:00
Siebrand Mazeland a65362f7fa Add context for different uses of "%1$s (%2$s)" 2010-11-02 23:08:59 +01:00
Brion Vibber 0229c22d23 Merge branch '1.0.x' into schema-x 2010-11-02 15:02:55 -07:00
Brion Vibber 04ca706601 Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/othersettings.php
2010-11-02 15:02:10 -07:00
Brion Vibber 426cda5e1f Alternate pretty-title tweaks for #2668 2010-11-02 13:42:44 -07:00
Brion Vibber 96521f38d2 Fix for changed cache functions in code merged up from 0.9.x 2010-10-29 16:31:25 -07:00
Brion Vibber ca489631db Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/subscriptions.php
	lib/router.php
	lib/xmppmanager.php
	lib/xmppoutqueuehandler.php
2010-10-25 13:08:57 -07:00
Evan Prodromou aef88c7cee max_id is inclusive 2010-10-25 11:18:49 -04:00
Evan Prodromou 968f9b0513 change max_id from < to <= 2010-10-25 11:08:53 -04:00
Evan Prodromou 1d85bfece1 New events when granting and revoking roles
Four new events for when roles are granted or revoked.
2010-10-22 10:31:50 -04:00
Zach Copley e8b6d7c946 Add support for an anonymous OAuth consumer. Note: this requires a
small DB tweak.  Oauth_application_user needs to have the primary
compound key: (profile_id, application_id, token).

http://status.net/open-source/issues/2761

This should also make it possible to have multiple access tokens
per application.

http://status.net/open-source/issues/2788
2010-10-19 20:54:53 -07:00
Brion Vibber 5f81f6119b Merge branch '0.9.x' into 1.0.x 2010-10-12 16:33:36 -07:00
Brion Vibber f4f16af8ac Add a basic group deletion for moderator users. 2010-10-12 15:49:20 -07:00
Brion Vibber 59119482ca Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
	actions/hostmeta.php
	actions/imsettings.php
	classes/User.php
	lib/adminpanelaction.php
	lib/channel.php
	lib/default.php
	lib/router.php
	lib/util.php
2010-10-04 12:54:36 -07:00
Zach Copley 3960c9ad39 Move blowFavesCache() to Profile 2010-09-29 16:35:12 -07:00
Zach Copley c19e592fa8 Move hasFave() to Profile 2010-09-29 16:35:12 -07:00
Siebrand Mazeland 9587f9f55b * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-28 23:42:18 +02:00
Evan Prodromou a319b40c97 common_cache_key() -> Cache::key() 2010-09-06 10:07:43 -04:00
Evan Prodromou 8f81762d68 common_memcache() => Cache::instance() 2010-09-06 09:56:45 -04:00
Evan Prodromou 974ac48771 bug in Profile::fromURI() wasn't returning profile 2010-09-01 16:55:16 -04:00
Evan Prodromou 7bec455a21 Static method to get a profile based on an URI 2010-09-01 16:15:22 -04:00
Brion Vibber 7e55fc0044 OStatus/FeedSub: tweaked PuSH feed garbage collection so other plugins can declare usage of a low-level feed or an OStatus profile besides profile subscriptions & group memberships.
SubMirror: redid add-mirror frontend to accept a feed URL, then pass that on to OStatus, instead of pulling from your subscriptions.
Profile: tweaked subscriberCount() so it doesn't subtract 1 for foreign profiles who aren't subscribed to themselves; instead excludes the self-subscription in the count query.
Memcached_DataObject: tweak to avoid extra error spew in the DB error raising

Work in progress: tweaking feedsub garbage collection so we can count other uses
2010-08-06 11:49:52 -07:00
Evan Prodromou 2ba36fc242 Merge branch 'activityhooks' into 0.9.x
Conflicts:
	classes/Notice.php
2010-08-03 16:01:18 -07:00
Evan Prodromou f83171824f correctly show <source> for atom feeds 2010-08-03 15:50:21 -07:00