WIP: Permissions
6/10 threads resolved
changed milestone to %Permission #review
added Sprint::09/25 - Oldfashioned Owl Squad::Green scoped labels
added MR::Requires Changes Product::Security scoped labels
- Resolved by Marcelo Rivera
- Resolved by Marcelo Rivera
- Last updated by Marcelo Rivera
43 private modal: SignupModalService 47 private modal: SignupModalService, 48 private permissionsService: PermissionsService, 49 private featuresService: FeaturesService 44 50 ) {} 45 51 46 set _object(value: any) { 52 @Input('object') set _object(value: any) { 47 53 this.object = value; 48 54 if (!this.object['thumbs:down:user_guids']) 49 55 this.object['thumbs:down:user_guids'] = []; 56 57 this.checkPermissions(); 58 } 59 60 private checkPermissions() { - Owner
return type?
- Developer
- Last updated by Marcelo Rivera
52 private permissionsService: PermissionsService, 53 private featuresService: FeaturesService, 48 54 private cd: ChangeDetectorRef 49 55 ) {} 50 56 51 set _object(value: any) { 57 @Input('object') set _object(value: any) { 52 58 if (!value) return; 53 59 this.object = value; 54 60 if (!this.object['thumbs:up:user_guids']) 55 61 this.object['thumbs:up:user_guids'] = []; 62 63 this.checkPermissions(); 64 } 65 66 private checkPermissions() { - Owner
return type void
- Developer
1 export enum Flags { - Owner
What is our plan for keeping this in sync with backend?
- Resolved by Marcelo Rivera
- Resolved by Marcelo Rivera
- Resolved by Marcelo Rivera
- Resolved by Marcelo Rivera
- Last updated by Marcelo Rivera
146 146 "environment" => getenv('MINDS_ENV') ?: 'development', 147 147 ]; 148 148 149 if(Minds\Core\Session::isLoggedIn()){ 150 $minds['user'] = Minds\Core\Session::getLoggedinUser()->export(); 151 $minds['user']['rewards'] = !!Minds\Core\Session::getLoggedinUser()->getPhoneNumberHash(); 152 $minds['wallet'] = array('balance' => Minds\Helpers\Counters::get(Minds\Core\Session::getLoggedinUser()->guid, 'points', false)); 149 if (Minds\Core\Session::isLoggedIn()) { 150 $user = Minds\Core\Session::getLoggedinUser(); 151 $minds['user'] = $user->export(); 152 $minds['user']['rewards'] = !!Minds\Core\Session::getLoggedinUser()->getPhoneNumberHash(); 153 $minds['wallet'] = array('balance' => Minds\Helpers\Counters::get(Minds\Core\Session::getLoggedinUser()->guid, 'points', false)); 154 155 if(Minds\Core\Di\Di::_()->get('Features\Manager')->has('permissions')) { - Owner
spacing. Also I'm not sure if window is the correct place for this. Especially with forward planning the SSR work
- Developer
If we're going to replace this code with an endpoint call, then it'd be just as easy as removing this from here and making sure that endpoint injects the permissions.
changed this line in version 3 of the diff