profile
viewpoint
Elton Maiyo eltronix @andela Kenya https://www.linkedin.com/in/elton-maiyo/ Fullstack-ish, leaning towards backend.

eltronix/NodeExpress-BankingPortal 1

Build a Banking Portal with Node & Express

eltronix/react-boilerplate 1

:fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.

eltronix/angular.io 0

Website for Angular 2

eltronix/angular.js 0

HTML enhanced for web apps

eltronix/cra_closer_look 0

An explanation of the problems that Create-React-App addresses, and how it attempts to solve them.

eltronix/create-react-app 0

Create React apps with no build configuration.

eltronix/django 0

The Web framework for perfectionists with deadlines.

eltronix/docs 0

TensorFlow documentation

eltronix/gitignore 0

A collection of useful .gitignore templates

created repositorykeijiro/SimpleCompositionTest

created time in 15 hours

created repositorykeijiro/AssetBundleBenchmark

created time in 2 days

created repositorykeijiro/BiplanarMapping

created time in 3 days

created repositorykeijiro/CC0TexturesUtils

created time in 3 days

pull request commentonury/accesscontrol

(feat) Allow `number` as valid role and grant type (fixes #93)

Coverage Status

Coverage increased (+0.04%) to 96.907% when pulling 0b40633bbb8182d2d937da6dcd2e110655464edc on vegerot:valid_number_role into c91eb6796b4a0e127a99b26f2fceb54d1f3353d4 on onury:master.

vegerot

comment created time in 8 days

PR opened onury/accesscontrol

(feat) Allow `number` as valid role and grant type (fixes #93)

In some cases it makes sense to have numbers instead of strings for role types. For example, when using enums in TypeScript

+6368 -3986

0 comment

30 changed files

pr created time in 8 days

issue commentonury/accesscontrol

throw error if does not have access to attributes

I think that u have to do it manually! Can u tell me what is your solution? thanks.

rained23

comment created time in 8 days

issue openedonury/accesscontrol

Allow `number` as valid type of role

Context:

I want to be able to define the roles in my application as a const enum in TypeScript like so

const enum ACRolesEnum {
  blocks,
  event,
  holidays,
  photos
}

const enum RoleTypes {
  User,
  Admin,
  Developer,
  Scheduler
}

roles
  .grant(RoleTypes.User)
    .readOwn(ACRolesEnum.photos)
    .readOwn(ACRolesEnum.event)
  .grant(RoleType.Developer)
    .readAny(ACRolesEnum.photos)
.lock()

Problem:

However, Typscript enums use numbers by default, and .grant, .read, etc. only accept string | string[].

Proposal: I've read through a lot of the code that uses these roles, and I can't see any reason we couldn't also accept number | number[] as part of it.

created time in 8 days

starteddeepmind/dm_memorytasks

started time in 9 days

created repositorykeijiro/DxrLattice

created time in 11 days

created repositorykeijiro/BoltOscJack

created time in 16 days

created repositorykeijiro/BoltKlakMath

created time in 22 days

created repositorykeijiro/BoltMinis

MIDI input extension for Bolt visual scripting

created time in a month

startedRealityStop/Bolt.Addons.Community

started time in a month

created repositorykeijiro/Eyeball

created time in a month

fork yelizariev/leave-a-comment

GitHub Action to leave a comment

fork in a month

startedJamesSingleton/leave-a-comment

started time in a month

issue commentdjango-erp/django-erp

Collaboration Proposal

I am matured Python Developer and now interested on Django . Keep going , I will join you when I understand how Django framework works . Time to Digging source code .

10537

comment created time in a month

fork yelizariev/PyInotify

An efficient and elegant inotify (Linux filesystem activity monitor) library for Python. Python 2 and 3 compatible.

fork in a month

fork yelizariev/odoo-module-migrator

Python library to migrate odoo base code from a version to another

fork in 2 months

created repositoryyelizariev/odoo-sh

created time in 2 months

issue commentonury/accesscontrol

Filter creates anwanted fields

I found something odd. when I filter my result with inclusion instead of exclusion , it works fine: my result when I filter like this: { role: 'admin', resource: 'user_profile', action: 'read:any', attributes: '_id ,firstName'} is: { "_id": "5f5e100462089c08ec23b39b", "firstName": "john" }, as you can see _id is represented by String.

but when I change my filter to: { role: 'admin', resource: 'user_profile', action: 'read:any', attributes: '* ,!phoneNumber' }, the result will be: { "_id": { "_bsontype": "ObjectID", "id": { "type": "Buffer", "data": [ 95, 94, 16, 4, 98, 8, 156, 8, 236, 35, 179, 155 ] } }, "addresses": [] ..... ,

now as you can see, ObjectIds are not represented as String.

1mohammad7

comment created time in 2 months

issue commentonury/accesscontrol

Filter creates anwanted fields

I have another problem now , when I lean the objects so that I don't get _doc , etc.. , I get an Object for all my fields that are type ObjectId instead of String representation.. like so:

{"user":{"_bsontype":"ObjectID","id":{"type":"Buffer","data":[95,94,16,4,98,8,156,8,236,35,179,155]}}

how can I filter without making unwanted fields (Without Leaning) or not having ObjectIds represented by Strings?

1mohammad7

comment created time in 2 months

IssuesEvent

PR opened django-erp/django-erp

fix manage to manage.py and add more of commands in README.md

hi all contributors thanks for your erp system

i start to use it and i will send any development to your package

this is the first one

+9 -3

0 comment

1 changed file

pr created time in 2 months

created repositorykeijiro/ConstantLumaColoring

created time in 2 months

issue closedonury/accesscontrol

Filter creates anwanted fields

I'm using mongoose-paginate-v2 to paginate my doccuments.when I get the docs from db, the format is like this: { docs:[ requested documents], page: ... .... } when I use filter on docs array, instead of filtering, it modifies it and creates unwanted fields:

"docs": [ { "$__": { "strictMode": true, "selected": { "password": 0 }, "getters": { "profileView": { "$init": true } }, "_id": { "_bsontype": "ObjectID", "id": { "type": "Buffer", "data": [ 95, 94, 16, 4, 98, 8, 156, 8, 236, 35, 179, 155 ] } }, "wasPopulated": false, ......... }, "isNew": false, "$locals": {}, "$op": null, "_doc": { MY_DOCS (unfiltered) } }

closed time in 2 months

1mohammad7

issue commentonury/accesscontrol

Filter creates anwanted fields

I fixed it , it had nothing to do with accesscontrol, it was because I didn't use plain mongoose object. I passed lean=true to mongoose-paginate and it worked

1mohammad7

comment created time in 2 months

issue openedonury/accesscontrol

Filter creates anwanted fields

I'm using mongoose-paginate-v2 to paginate my doccuments.when I get the docs from db, the format is like this: { docs:[ requested documents], page: ... .... } when I use filter on docs array, instead of filtering, it modifies it and creates unwanted fields:

"docs": [ { "$__": { "strictMode": true, "selected": { "password": 0 }, "getters": { "profileView": { "$init": true } }, "_id": { "_bsontype": "ObjectID", "id": { "type": "Buffer", "data": [ 95, 94, 16, 4, 98, 8, 156, 8, 236, 35, 179, 155 ] } }, "wasPopulated": false, ......... }, "isNew": false, "$locals": {}, "$op": null, "_doc": { MY_DOCS (unfiltered) } }

created time in 2 months

more