These are chat archives for directus/directus

28th
Nov 2016
Ben Haynes
@benhaynes
Nov 28 2016 16:27
Hey @doughnet – all great suggestions! Let me try to answer as many as I can. Also, I will mention that we have an open Slack channel that we are always on... you may get faster answers to questions there. You can get invited at: http://slack.getdirectus.com
Glad you figured out the field level permissions – though I think the new interface will be MUCH easier to understand and edit...
doughnet
@doughnet
Nov 28 2016 16:34
good morning @benhaynes
Ben Haynes
@benhaynes
Nov 28 2016 16:35
Morning!
doughnet
@doughnet
Nov 28 2016 16:35
any ideas on why the privileges aren't working for groups?
Ben Haynes
@benhaynes
Nov 28 2016 16:35
For the Table Permissions, we try not to do too much automatically, as that can be confusing.
Since you may disable the relational field for that group (field-level) and not have wanted the relational table to get permissions automatically
doughnet
@doughnet
Nov 28 2016 16:36
for the Table Permissions; it does make sense as you mentioned right now
you could make some fields visible but not editable ... etc etc ... it provides extreme flexibility
Ben Haynes
@benhaynes
Nov 28 2016 16:37
Not sure about column-level directory or saving options – I like that idea... you should post it to http://feathub.com/directus/directus
You could also write a UI that handles different paths within it's options – but I don't know how well that would jive with the Directus Files page
doughnet
@doughnet
Nov 28 2016 16:38
true true
Ben Haynes
@benhaynes
Nov 28 2016 16:38
Though each file has an adapter, so it shouldn't matter
doughnet
@doughnet
Nov 28 2016 16:38
figured in the field options for a Single/Multiple Files
you could either leave it alone as the standard directory path for saving
OR enter a full path for saving
Ben Haynes
@benhaynes
Nov 28 2016 16:39
Yeah, I like that!
Our devs are pretty busy at the moment, but you should give it a try... if it works well across the board we'll definitely merge it in!
I can't think of a reason why it wouldn't work...
I'll make sure @WellingGuzman knows about this need for the next API/SDKs so that you can choose which adapter to use when uploading files
doughnet
@doughnet
Nov 28 2016 16:41
cool
Ben Haynes
@benhaynes
Nov 28 2016 16:42
For your question about contextual inter-related fields...
You can write an javascript in the UI, so you could make a custom UI that when you choose a dropdown it shows/hides other UIs or does something asynchronously on another table (through the API/SDK)
doughnet
@doughnet
Nov 28 2016 16:44
yeah that's kind of what i was thinking of
i'll have to see how about doing that (I'm not much of a coder at all)
Ben Haynes
@benhaynes
Nov 28 2016 16:45
Yeah, I've written them to show/hide other fields... but technically you can do anything you want
doughnet
@doughnet
Nov 28 2016 16:46
cool cool
Ben Haynes
@benhaynes
Nov 28 2016 16:46
For the single file allowed file types, I believe it is based on the MIME type... but we released a fix to work with extensions too
doughnet
@doughnet
Nov 28 2016 16:47
i tried using a format of: jpg, png
Ben Haynes
@benhaynes
Nov 28 2016 16:47
Maybe it was whitespace related? jpg, png versus jpg,png? We can look into it
doughnet
@doughnet
Nov 28 2016 16:47
tried both
neither worked
Ben Haynes
@benhaynes
Nov 28 2016 16:48
Hmm, OK... could you open a GitHub issue? Then we can get it resolved today
doughnet
@doughnet
Nov 28 2016 16:48
okie dokie
Ben Haynes
@benhaynes
Nov 28 2016 16:49
As for Group Permissions – there are two states (big and small)
big let's you edit/view/delete ALL items, while small only allows you to update items YOU created (requires the user_created column)
doughnet
@doughnet
Nov 28 2016 16:50
so for the small state
Ben Haynes
@benhaynes
Nov 28 2016 16:50
There is no "Group" state, but that is another great idea. So it could be: YOUR items, YOUR GROUP's items, or ALL items.
doughnet
@doughnet
Nov 28 2016 16:50
what do you mean it requires the user_created column
Ben Haynes
@benhaynes
Nov 28 2016 16:50
Right now we're missing the middle one
doughnet
@doughnet
Nov 28 2016 16:51
requires as in ... i need to create a column in the table called user_created?
user_create_column is required for that to work... since we need to know who created the column
doughnet
@doughnet
Nov 28 2016 16:52
so thats created within the new table or in the directus_tables
??
Ben Haynes
@benhaynes
Nov 28 2016 16:52
you can name it whatever you want, but you need to enter the column name there
the new table
So each table could/would have a column tracking who created it, modified it, and the respective datetimes
That COULD be moved into the Directus system tables... another FeatHub ticket ;)
doughnet
@doughnet
Nov 28 2016 16:53
so i create a column/field in my new table called user_create_column
it's a relational many to one?
i don't understand how Directus know to dump the user create/modify/date info into it
Ben Haynes
@benhaynes
Nov 28 2016 16:57
This will have an interface in the next redesign, but for now you would add a column into your table... you can call it anything, but let's say it's my_table.create_user (INT type). Then you go to the directus_tables table and find the record for that table and enter "create_user" into the user_create_column field. Then Directus knows what to do and saves the Directus User ID into each new record for your table.
The same applies for dates and modify.
doughnet
@doughnet
Nov 28 2016 16:58
so if i have multiple tables that need to have the privileges ...
i create a my_table2.create_user
Ben Haynes
@benhaynes
Nov 28 2016 16:59
yup
doughnet
@doughnet
Nov 28 2016 16:59
but i dont need to do anything else in the directus_tables?
Ben Haynes
@benhaynes
Nov 28 2016 16:59
I will talk with Welling about using the activity table for this – since we're already storing this data elsewhere
doughnet
@doughnet
Nov 28 2016 16:59
what User Interface (UI) should be used for the my_table.create_user?
Ben Haynes
@benhaynes
Nov 28 2016 17:00
you would still need to add the same value in directus_tables for my_table2
I believe there's a directus_user UI that will show the avatar and name
doughnet
@doughnet
Nov 28 2016 17:02
soo .... hmm .... how do i access the directus_table ?
Ben Haynes
@benhaynes
Nov 28 2016 17:02
PHP-My-Admin or https://www.sequelpro.com/ ... or any SQL client
doughnet
@doughnet
Nov 28 2016 17:03
ah ... yeah that's inconvenient (for now)
figured within directus it could be accessed
thought settings the privileges wtihin the Group Permissions would work out of the box
Ben Haynes
@benhaynes
Nov 28 2016 17:04
Yeah, everything will be accessible in the next version, as of now things are still geared towards developers
Well I'm going to raise the point that we should pull that info from directus_activity... then users won't have to enter these columns any more
doughnet
@doughnet
Nov 28 2016 17:05
that would be a nice out of the box solution
doughnet
@doughnet
Nov 28 2016 17:10
thanks for your help @benhaynes
guess i'm jumping the gun on what I want to do and should just wait until the new releases
trying to create a multiple site CMS using directus
hence the group privileges (i.e. site1,2,3 edit their own content but have multiple users)
save files in different locations (i.e. /var/www/site1, site2, site3, etc)
doughnet
@doughnet
Nov 28 2016 18:15
@benhaynes do files/uploads follow the same permissions as well? are users able to view only their own files? or do they see ALL files?
Ben Haynes
@benhaynes
Nov 28 2016 19:40
Ahh, that makes sense. Yeah, that would be much easier and cleaner with Group Edit permissions and choosing file adapters per column...
@doughnet – You can adjust the directus_files table permissions the same as any other, so you can have big/small permissions there too.
Though it seems that we might want to add group-level across the board. If you add it to FeatHub I will upvote it... we should be able to add that into the next release (after API/SDK)
doughnet
@doughnet
Nov 28 2016 20:43
@benhaynes yeah I did add the 3 different feathub items