How to exclude values in a Phabricator query - phabricator

For example, I need to get all Maniphest tasks that are assigned to not me. Can I achieve it in Phabricator?

This feature doesn't currently exist.

Related

How do I store related firebase data?

I'm making a firebase app where there's the concept of posts and authors.
I need to have a field called postedBy to give information about the post author. I'm currently confused on how to best implement this. Here's what I've thought about...
Store a postedBy field with the post author's ID as value. My issue with this is that I have to further send single requests for the user information, like name, profile picture etc.
I store a postedBy field with the exact clone of the author's data (name, profile URL, etc). My issue with this is what if the user changes their profile information? Do I have to loop through all the posts data to also ensure the changes?
What is the best way to solve an issue like this?
For your case, I would say that the best option would be probably to use only the ID as a value. This way, you can perform queries to return values using only the ID.
Using this approach should be the simplest and easiest way for you to create your application. Since the ID will be the point to connect your tables and to perform the queries, it should make your work easier.
In the below article, there is an example of a Blog application, that you can take a look and get some insights on how to configure your application as well - mainly about this part about author and post. :)
Learning Firebase: Creating a blog article object
Let me know if the information helped you!

Recursively get members of an AD group

The MS Graph API has the possibility to list the direct members of an AD group using
/groups/{id}/members
Is there a way to get both direct and indirect members, i.e. member of members of members and so on and so forth.
I would like to avoid the need to implement some recursive logic on the client if it can be done another way, possibly through the use of OData query parameters?
I have tried the following using $expand and $level, but unfortunately the 'members' navigation property doesn't exist on the child groups for some reason and I guess that's why they are not expanded.
https://graph.microsoft.com/v1.0/groups('{group-id}')?$expand=members($levels=max)
Unrelated to the question, could someone with the necessary SO permissions please make the ms-graph and the microsoftgraph tags synonyms?
Update: The feature request mentioned below is in beta now.
I found a feature request on uservoice.com for this, so it seems like it does not exist yet. If you came here looking for the solution, I encourage you to go and vote for the feature.

DynamoDB Update Item

Could someone please give some basic code on how to update items? I am using it an have an app that needs to add/delete values to list and map properties on table items without completely deleting the value. I also have a number property that I need to use as counter. In AWS documentation it simply states to re-save the entire object. I know it is possible to update items in this manner however I cannot seem to find any code. My app is in objective c however this seems like a problem for many people using many languages so this may be a great place to answer this for any and all languages. Thanks.

Dataobject and Page relationships

http://www.silverstripe.org/archive/show/1638
The above post seems like it's what I should do but I just need some help sorting this out in my head.
Firstly, I need to create a relationship between a page (Owner, for example) and a dataobject (Car). An owner can create many cars which are linked to that one owner. However, I have another page (Garage) which can create cars that are linked to every owner. If an owner does not want one of these cars they reject it. I was thinking the manymanydataobjectmanager would be good for that bit.
Each owner should only be able to see the cars that relate directly to them within the CMS, not other peoples cars, so I was using dataobjectmanager and assigning permissions to the page using groups.
The thing that is really making this awkward is that when it's all set up I need to output JSON which will consist of the cars the owners created and the cars they accepted from the garage, not the ones they rejected. I'm thinking I need another table like the linked table but with a status column perhaps?
To clarify, my question is how do I create this mess in a constructive SilverStripe way? Is the approach I was taking correct or is there a better way?
Many thanks in advance and please tell me if I've been unclear.
are you using silverstripe 3?
could you clarify what of the actions happen in the backend and what actions are possible for the user in the frontend?
maybe for your relations it could be better to use ModelAdmin:
http://doc.silverstripe.org/framework/en/reference/modeladmin
It gives you the opportunity to manage relations without the Sitetree/Pages Overhead. For example creating a Sitetree Element just to have an Owner is not the best way - except if you really need an Owner represented as a real Page. Owner could be also just a Dataobject instead.
Especially if you want to output just JSON in the end you are maybe completely independent of Sitetree/Pages... then you could write a custom controller with a routing rule and which gives you back just the data that you need:
http://doc.silverstripe.org/framework/en/topics/controller
regards,
Florian

How to prevent access to node based on custom filter/field in node?

I am looking for a way to control access to a node (my own content type), even when it has the "published" bit set. I have a custom field (datetime) that specifies when the node should be available to visitors. How do I hook in to Drupal 7 to do that?
Best regards, Egil.
Have a look on node_access(), you should be able to do what you need there.
I accomplished a similar thing using hook_node_access_records() and hook_node_grants(). My example is for a field within a node that restricts access on a group level, but the same concept works (more easily) for non-group content.
The description of what I did is here: https://drupal.stackexchange.com/questions/36269/how-to-restrict-node-access-to-nodes-based-on-field-value/83975#83975
However, it might be easier for you to follow Node Access Example Module: https://api.drupal.org/api/examples/node_access_example!node_access_example.module/7
That is exactly what I modified to get my code.

Resources